improve error messages

This commit is contained in:
josc146
2023-06-15 21:57:54 +08:00
parent 21c3009945
commit d99488f22f
5 changed files with 24 additions and 15 deletions

View File

@@ -4,6 +4,7 @@ import (
"errors"
"os"
"os/exec"
"path/filepath"
"runtime"
"strconv"
"strings"
@@ -51,6 +52,10 @@ func (a *App) InstallPyDep(python string, cnMirror bool) (string, error) {
if python == "" {
python, err = GetPython()
if runtime.GOOS == "windows" {
python, err = filepath.Abs(python)
if err != nil {
return "", err
}
python = `"` + python + `"`
}
}