1
0
mirror of https://gitea.com/gitea/act synced 2026-05-01 01:27:48 +02:00
Files
act/vendor/github.com/spf13/cobra/command_win.go
Casey Lee 320e9b6057 fail on error (#20)
ci-via-github-actions
2019-01-23 11:51:22 -08:00

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