From 15e4156802464df3e0cd0125c93f90208a896dca Mon Sep 17 00:00:00 2001 From: root Date: Fri, 1 May 2026 03:02:02 +0300 Subject: [PATCH] main.go: open test window on bare 'drover' (no subcommand) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Without this, double-clicking drover.exe printed CLI help to stdout — fine in a terminal but invisible to a user who just clicked an icon. Adding a RunE on the root command opens the smoke-test message box when no subcommand was given. CLI flags (--version, --help) and explicit subcommands keep their old behaviour. Co-Authored-By: Claude Opus 4.7 (1M context) --- cmd/drover/main.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/cmd/drover/main.go b/cmd/drover/main.go index 4987245..748582f 100644 --- a/cmd/drover/main.go +++ b/cmd/drover/main.go @@ -39,6 +39,13 @@ func newRootCmd() *cobra.Command { Version: fmt.Sprintf("%s (commit %s, built %s)", Version, Commit, BuildDate), SilenceUsage: true, SilenceErrors: false, + // No subcommand and no flags = end-user double-clicked the exe; + // open the smoke-test window instead of dumping CLI help to a + // console they didn't ask for. + RunE: func(cmd *cobra.Command, args []string) error { + showTestWindow() + return nil + }, } // Custom version template: "drover-go vX.Y.Z (commit abc1234, built 2026-05-01)".