mirror of
https://github.com/ceph/ceph-csi.git
synced 2024-11-15 10:50:18 +00:00
c4f79d455f
As kubernetes 1.24.0 is released, updating kubernetes dependencies to 1.24.0 updates: #3086 Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
28 lines
452 B
Go
28 lines
452 B
Go
//go:build windows
|
|
// +build windows
|
|
|
|
package cobra
|
|
|
|
import (
|
|
"fmt"
|
|
"os"
|
|
"time"
|
|
|
|
"github.com/inconshreveable/mousetrap"
|
|
)
|
|
|
|
var preExecHookFn = preExecHook
|
|
|
|
func preExecHook(c *Command) {
|
|
if MousetrapHelpText != "" && mousetrap.StartedByExplorer() {
|
|
c.Print(MousetrapHelpText)
|
|
if MousetrapDisplayDuration > 0 {
|
|
time.Sleep(MousetrapDisplayDuration)
|
|
} else {
|
|
c.Println("Press return to continue...")
|
|
fmt.Scanln()
|
|
}
|
|
os.Exit(1)
|
|
}
|
|
}
|