move cobra mutation and document it

This commit is contained in:
vilmibm 2020-11-02 16:22:02 -08:00
parent 15e1ad02d3
commit f519989d5c
2 changed files with 4 additions and 2 deletions

View file

@ -61,6 +61,10 @@ func main() {
}
}
// Enable running gh from explorer.exe. 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 = ""
rootCmd := root.NewCmdRoot(cmdFactory, command.Version, command.BuildDate)
cfg, err := cmdFactory.Config()

View file

@ -25,8 +25,6 @@ import (
)
func NewCmdRoot(f *cmdutil.Factory, version, buildDate string) *cobra.Command {
cobra.MousetrapHelpText = ""
cmd := &cobra.Command{
Use: "gh <command> <subcommand> [flags]",
Short: "GitHub CLI",