Merge pull request #2383 from cristiand391/fix-mousetrap-windows

Show MousetrapHelpText when double-clicking gh.exe
This commit is contained in:
Mislav Marohnić 2020-11-11 12:52:21 +01:00 committed by GitHub
commit 91df27f30a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -64,9 +64,11 @@ func main() {
}
}
// Enable running gh from explorer.exe. Without this, the user is told to stop and run from a
// Enable running gh from Windows File Explorer's address bar. Without this, the user is told to stop and run from a
// terminal. With this, a user can clone a repo (or take other actions) directly from explorer.
cobra.MousetrapHelpText = ""
if len(os.Args) > 1 && os.Args[1] != "" {
cobra.MousetrapHelpText = ""
}
rootCmd := root.NewCmdRoot(cmdFactory, buildVersion, buildDate)