MCPcopy
hub / github.com/spf13/cobra / preExecHook

Function preExecHook

command_win.go:30–41  ·  view source on GitHub ↗
(c *Command)

Source from the content-addressed store, hash-verified

28var preExecHookFn = preExecHook
29
30func preExecHook(c *Command) {
31 if MousetrapHelpText != "" && mousetrap.StartedByExplorer() {
32 c.Print(MousetrapHelpText)
33 if MousetrapDisplayDuration > 0 {
34 time.Sleep(MousetrapDisplayDuration)
35 } else {
36 c.Println("Press return to continue...")
37 fmt.Scanln()
38 }
39 os.Exit(1)
40 }
41}

Callers

nothing calls this directly

Calls 2

PrintMethod · 0.80
PrintlnMethod · 0.80

Tested by

no test coverage detected