mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2024-11-23 12:16:38 +00:00
b56dae8120
* update all but bun libraries Signed-off-by: kim <grufwub@gmail.com> * remove my personal build script changes Signed-off-by: kim <grufwub@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)
|
|
}
|
|
}
|