upgrade k8s v1.3 - fix #6, #12

This commit is contained in:
ngtuna
2016-07-06 01:41:04 +07:00
parent ce32befbb2
commit f7295153f3
732 changed files with 197506 additions and 41490 deletions
+26
View File
@@ -0,0 +1,26 @@
// +build windows
package cobra
import (
"os"
"time"
"github.com/inconshreveable/mousetrap"
)
var preExecHookFn = preExecHook
// enables an information splash screen on Windows if the CLI is started from explorer.exe.
var MousetrapHelpText string = `This is a command line tool
You need to open cmd.exe and run it from there.
`
func preExecHook(c *Command) {
if mousetrap.StartedByExplorer() {
c.Print(MousetrapHelpText)
time.Sleep(5 * time.Second)
os.Exit(1)
}
}