fix Cmd and CopyFile

This commit is contained in:
josc146
2023-05-31 16:27:43 +08:00
parent 2f5a7d2d51
commit b03b00419b
2 changed files with 11 additions and 0 deletions

View File

@@ -15,6 +15,11 @@ import (
)
func Cmd(args ...string) (string, error) {
path, err := filepath.Abs(args[0])
if err != nil {
return "", err
}
args[0] = path
if runtime.GOOS == "windows" {
_, err := os.Stat("cmd-helper.bat")
if err != nil {