mirror of https://github.com/fatedier/frp
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
305 B
21 lines
305 B
7 years ago
|
// +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)
|
||
|
}
|
||
|
}
|