fix: ensure all dependencies in debugtalk.go are installed

This commit is contained in:
xucong053
2022-06-09 11:26:28 +08:00
parent 46a3149654
commit a87c36268b
2 changed files with 26 additions and 0 deletions
+5
View File
@@ -103,6 +103,11 @@ func EnsurePython3Venv(packages ...string) (string, error) {
return python3, nil
}
func CheckPythonScriptSyntax(path string) error {
err := ExecCommand("python3", "-m", "py_compile", path)
return err
}
func ExecCommandInDir(cmd *exec.Cmd, dir string) error {
log.Info().Str("cmd", cmd.String()).Str("dir", dir).Msg("exec command")
cmd.Dir = dir