Files
actions-sync/vendor/github.com/spf13/cobra/command_win.go
Florian Wagner bde5f88201 bump go modules
Signed-off-by: GitHub <noreply@github.com>
2022-04-26 03:37:19 +00:00

28 lines
452 B
Go
Generated

//go:build windows
// +build windows
package cobra
import (
"fmt"
"os"
"time"
"github.com/inconshreveable/mousetrap"
)
var preExecHookFn = preExecHook
func preExecHook(c *Command) {
if MousetrapHelpText != "" && mousetrap.StartedByExplorer() {
c.Print(MousetrapHelpText)
if MousetrapDisplayDuration > 0 {
time.Sleep(MousetrapDisplayDuration)
} else {
c.Println("Press return to continue...")
fmt.Scanln()
}
os.Exit(1)
}
}