aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/github.com/spf13/cobra/command_win.go
diff options
context:
space:
mode:
authorMichael Muré <batolettre@gmail.com>2019-05-22 20:53:53 +0200
committerMichael Muré <batolettre@gmail.com>2019-05-22 20:53:53 +0200
commit485ca5900486b7fc3ea71cbcbb39b87272ae09fd (patch)
tree92551be8e01130542f969d06282abfc4a1c43629 /vendor/github.com/spf13/cobra/command_win.go
parente781d6c7fe7dba2fc526c2049aa188c9988e1cf4 (diff)
downloadgit-bug-485ca5900486b7fc3ea71cbcbb39b87272ae09fd.tar.gz
vendor: update dependencies
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, 7 insertions, 1 deletions
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)
}
}