OSDN Git Service

Hulk did something
[bytom/vapor.git] / vendor / github.com / spf13 / cobra / command_win.go
1 // +build windows
2
3 package cobra
4
5 import (
6         "os"
7         "time"
8
9         "github.com/inconshreveable/mousetrap"
10 )
11
12 var preExecHookFn = preExecHook
13
14 func preExecHook(c *Command) {
15         if MousetrapHelpText != "" && mousetrap.StartedByExplorer() {
16                 c.Print(MousetrapHelpText)
17                 time.Sleep(5 * time.Second)
18                 os.Exit(1)
19         }
20 }