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))
if err != nil {
log.Error("exe cmd error: ", err)
output = *ParseErrorOutput(err)
return &output
str := fmt.Sprintf("Command: %s output:\n\n%v\n", command, string(out))
//output = *ParseErrorOutput(err)
output = []byte(str)
//return &output
} else {
str := fmt.Sprintf("Command: %s output:\n\n%v\n", command, string(out))
output = []byte(str)