improve python dependencies installation

This commit is contained in:
josc146
2023-06-14 22:21:17 +08:00
parent 64f0610ed7
commit 51c5696bb9
6 changed files with 30 additions and 30 deletions

View File

@@ -17,7 +17,7 @@ import (
func Cmd(args ...string) (string, error) {
switch platform := runtime.GOOS; platform {
case "windows":
if err := os.WriteFile("./cmd-helper.bat", []byte("start /wait %*"), 0644); err != nil {
if err := os.WriteFile("./cmd-helper.bat", []byte("start %*"), 0644); err != nil {
return "", err
}
cmdHelper, err := filepath.Abs("./cmd-helper")
@@ -115,11 +115,19 @@ func GetPython() (string, error) {
if err != nil {
return "", errors.New("failed to unzip python")
} else {
return "py310/python.exe", nil
python, err := filepath.Abs("py310/python.exe")
if err != nil {
return "", err
}
return python, nil
}
}
} else {
return "py310/python.exe", nil
python, err := filepath.Abs("py310/python.exe")
if err != nil {
return "", err
}
return python, nil
}
case "darwin":
return "python3", nil