From 485ca5900486b7fc3ea71cbcbb39b87272ae09fd Mon Sep 17 00:00:00 2001 From: Michael Muré Date: Wed, 22 May 2019 20:53:53 +0200 Subject: vendor: update dependencies --- vendor/github.com/spf13/cobra/command_win.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'vendor/github.com/spf13/cobra/command_win.go') diff --git a/vendor/github.com/spf13/cobra/command_win.go b/vendor/github.com/spf13/cobra/command_win.go index edec728e..8768b173 100644 --- a/vendor/github.com/spf13/cobra/command_win.go +++ b/vendor/github.com/spf13/cobra/command_win.go @@ -3,6 +3,7 @@ package cobra import ( + "fmt" "os" "time" @@ -14,7 +15,12 @@ var preExecHookFn = preExecHook func preExecHook(c *Command) { if MousetrapHelpText != "" && mousetrap.StartedByExplorer() { c.Print(MousetrapHelpText) - time.Sleep(5 * time.Second) + if MousetrapDisplayDuration > 0 { + time.Sleep(MousetrapDisplayDuration) + } else { + c.Println("Press return to continue...") + fmt.Scanln() + } os.Exit(1) } } -- cgit