1
0
mirror of https://github.com/Luzifer/expose.git synced 2024-09-20 16:12:58 +00:00
expose/vendor/github.com/spf13/cobra/command_win.go
Knut Ahlers 360c8ec055
Switch to dep for vendoring
Signed-off-by: Knut Ahlers <knut@ahlers.me>
2018-09-17 21:32:52 +02:00

21 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)
}
}