[ Agent ] [ Executor ] - 修改底层执行返回逻辑
This commit is contained in:
@@ -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)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user