prateekpandey14 9e60b2f3c8 Add vendor dependencies
Signed-off-by: prateekpandey14 <prateekpandey14@gmail.com>
2019-02-07 14:49:15 +05:30

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