1
0
Fork 0
mirror of https://github.com/Luzifer/password.git synced 2024-11-14 12:12:46 +00:00
password/vendor/github.com/spf13/cobra/command_win.go

21 lines
305 B
Go
Raw Normal View History

// +build windows
package cobra
import (
"os"
"time"
"github.com/inconshreveable/mousetrap"
)
var preExecHookFn = preExecHook
func preExecHook(c *Command) {
if MousetrapHelpText != "" && mousetrap.StartedByExplorer() {
c.Print(MousetrapHelpText)
time.Sleep(5 * time.Second)
os.Exit(1)
}
}