This commit is contained in:
2023-08-18 12:47:51 +08:00
parent f4092ef016
commit d399a31c72

View File

@@ -442,8 +442,10 @@ func RunShellCommand(mml *MmlCommand, omcMmlVar *MmlVar, outputJson *dborm.MmlOu
log.Tracef("Exec output: %v", string(out)) log.Tracef("Exec output: %v", string(out))
if err != nil { if err != nil {
log.Error("exe cmd error: ", err) log.Error("exe cmd error: ", err)
output = *ParseErrorOutput(err) str := fmt.Sprintf("Command: %s output:\n\n%v\n", command, string(out))
return &output //output = *ParseErrorOutput(err)
output = []byte(str)
//return &output
} else { } else {
str := fmt.Sprintf("Command: %s output:\n\n%v\n", command, string(out)) str := fmt.Sprintf("Command: %s output:\n\n%v\n", command, string(out))
output = []byte(str) output = []byte(str)