go.mod: spf13/cobra v1.0.0
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
parent
f9c1b86feb
commit
79ead619be
43 changed files with 3224 additions and 455 deletions
8
vendor/github.com/spf13/cobra/command_win.go
generated
vendored
8
vendor/github.com/spf13/cobra/command_win.go
generated
vendored
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue