Merge pull request #1346 from xucong053/bugfix

fix: ensure all dependencies in debugtalk.go are installed
This commit is contained in:
debugtalk
2022-06-09 22:07:39 +08:00
committed by GitHub
5 changed files with 30 additions and 2 deletions

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