Skip to content

Commit 79878a6

Browse files
committed
Show MousetrapHelpText when double-clicking gh.exe
1 parent 9edcd68 commit 79878a6

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

cmd/gh/main.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,11 @@ func main() {
6464
}
6565
}
6666

67-
// Enable running gh from explorer.exe. Without this, the user is told to stop and run from a
67+
// Enable running gh from Windows File Explorer's address bar. Without this, the user is told to stop and run from a
6868
// terminal. With this, a user can clone a repo (or take other actions) directly from explorer.
69-
cobra.MousetrapHelpText = ""
69+
if len(os.Args) > 1 && os.Args[1] != "" {
70+
cobra.MousetrapHelpText = ""
71+
}
7072

7173
rootCmd := root.NewCmdRoot(cmdFactory, buildVersion, buildDate)
7274

0 commit comments

Comments
 (0)