summaryrefslogtreecommitdiffstats
path: root/vendor/github.com/spf13/cobra/command_win.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/github.com/spf13/cobra/command_win.go')
-rw-r--r--vendor/github.com/spf13/cobra/command_win.go8
1 files changed, 1 insertions, 7 deletions
diff --git a/vendor/github.com/spf13/cobra/command_win.go b/vendor/github.com/spf13/cobra/command_win.go
index 4b0eaa1b6..edec728e4 100644
--- a/vendor/github.com/spf13/cobra/command_win.go
+++ b/vendor/github.com/spf13/cobra/command_win.go
@@ -11,14 +11,8 @@ import (
var preExecHookFn = preExecHook
-// enables an information splash screen on Windows if the CLI is started from explorer.exe.
-var MousetrapHelpText string = `This is a command line tool
-
-You need to open cmd.exe and run it from there.
-`
-
func preExecHook(c *Command) {
- if mousetrap.StartedByExplorer() {
+ if MousetrapHelpText != "" && mousetrap.StartedByExplorer() {
c.Print(MousetrapHelpText)
time.Sleep(5 * time.Second)
os.Exit(1)