Skip to content

Commit f8beb1c

Browse files
author
woytu
committed
添加命令执行错误注释
1 parent 7b4f458 commit f8beb1c

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

utils/exec.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ func ExecutePython(script string, args ...string) (result string, err error) {
1919
// 把脚本和参数组合到一个字符串数组
2020
args = append([]string{script}, args...)
2121
out, err := exec.Command(name, args...).Output()
22+
// exit status 2 一般是文件没有找到
23+
// exit status 1 一般是命令执行错误
2224
if err != nil {
2325
return string(out), err
2426
}

0 commit comments

Comments
 (0)