1
0
Fork 0
mirror of https://github.com/Luzifer/password.git synced 2024-11-12 19:22:42 +00:00
password/vendor/github.com/spf13/cobra/command_win.go
Knut Ahlers c61820a9d2
Vendor dependencies
Signed-off-by: Knut Ahlers <knut@ahlers.me>
2017-09-22 15:28:56 +02:00

20 lines
305 B
Go

// +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)
}
}