From d0309a69fa8af3d71fba65e2c5051a4632643f51 Mon Sep 17 00:00:00 2001 From: zeaslity Date: Tue, 7 Nov 2023 15:58:25 +0800 Subject: [PATCH] =?UTF-8?q?[=20Agent=20]=20[=20Executor=20]=20-=20?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=BA=95=E5=B1=82=E6=89=A7=E8=A1=8C=E8=BF=94?= =?UTF-8?q?=E5=9B=9E=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- agent-go/executor/CommandExecutor.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/agent-go/executor/CommandExecutor.go b/agent-go/executor/CommandExecutor.go index 8da2f23..5688093 100644 --- a/agent-go/executor/CommandExecutor.go +++ b/agent-go/executor/CommandExecutor.go @@ -6,6 +6,7 @@ import ( "bytes" "fmt" "os/exec" + "strconv" "strings" ) @@ -71,8 +72,7 @@ func Execute(em *ExecutionMessage) (bool, []string) { if err != nil { resultLog = append(resultLog, " 命令执行错误如下 ", err.Error()) } - - resultLog = append(resultLog, fmt.Sprintf("命令 %s 执行结果为 %b", executionContent, ok)) + resultLog = append(resultLog, fmt.Sprintf("命令 %s 执行结果为 %s", executionContent, strconv.FormatBool(ok))) // debug log.DebugF("%v", resultLog)