[ Agent ] [ Executor ] - 修改底层执行返回逻辑

This commit is contained in:
zeaslity
2023-11-07 15:58:25 +08:00
parent dc5ab043fb
commit d0309a69fa

View File

@@ -6,6 +6,7 @@ import (
"bytes" "bytes"
"fmt" "fmt"
"os/exec" "os/exec"
"strconv"
"strings" "strings"
) )
@@ -71,8 +72,7 @@ func Execute(em *ExecutionMessage) (bool, []string) {
if err != nil { if err != nil {
resultLog = append(resultLog, " 命令执行错误如下 ", err.Error()) resultLog = append(resultLog, " 命令执行错误如下 ", err.Error())
} }
resultLog = append(resultLog, fmt.Sprintf("命令 %s 执行结果为 %s", executionContent, strconv.FormatBool(ok)))
resultLog = append(resultLog, fmt.Sprintf("命令 %s 执行结果为 %b", executionContent, ok))
// debug // debug
log.DebugF("%v", resultLog) log.DebugF("%v", resultLog)