1
0
Fork 0
mirror of https://github.com/Luzifer/worktime.git synced 2024-10-18 16:14:21 +00:00
worktime/vendor/github.com/spf13/cobra/command_win.go
Knut Ahlers 6249d99e0a
Switch to dep from Godeps, update dependencies
Signed-off-by: Knut Ahlers <knut@ahlers.me>
2017-09-22 13:18:15 +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)
}
}