improve python script error messages

This commit is contained in:
josc146
2023-07-07 20:16:35 +08:00
parent 2d545604f4
commit 6fbb86667c
9 changed files with 115 additions and 65 deletions

View File

@@ -113,3 +113,11 @@ func (a *App) InstallPyDep(python string, cnMirror bool) (string, error) {
return Cmd(python, "-m", "pip", "install", "-r", "./backend-python/requirements_without_cyac.txt")
}
}
func (a *App) GetPyError() string {
content, err := os.ReadFile("./error.txt")
if err != nil {
return ""
}
return string(content)
}