This commit is contained in:
josc146
2023-06-06 21:52:38 +08:00
parent cfad67a922
commit 4814b88172
2 changed files with 3 additions and 6 deletions

View File

@@ -17,11 +17,8 @@ import (
func Cmd(args ...string) (string, error) {
switch platform := runtime.GOOS; platform {
case "windows":
_, err := os.Stat("cmd-helper.bat")
if err != nil {
if err := os.WriteFile("./cmd-helper.bat", []byte("start %*"), 0644); err != nil {
return "", err
}
if err := os.WriteFile("./cmd-helper.bat", []byte("start /wait %*"), 0644); err != nil {
return "", err
}
cmdHelper, err := filepath.Abs("./cmd-helper")
if err != nil {