[ Agent ] [ Executor ] - 调整Executor部分的代码

This commit is contained in:
zeaslity
2023-10-11 11:24:27 +08:00
parent 346512e770
commit 62712dfbce
4 changed files with 155 additions and 19 deletions

View File

@@ -32,7 +32,7 @@ func Execute(em *ExecutionMessage) ([]string, error) {
if strings.HasPrefix(em.Type, "BASE") {
// base function
resultLog = AgentOsOperatorCache.Exec(em.FuncContent[0], em.FuncContent[1:]...)
resultLog = AgentOsOperatorCache.Command(em.FuncContent[0], em.FuncContent[1:]...)
err = nil
} else if strings.HasPrefix(em.Type, "APP") {
@@ -100,7 +100,7 @@ func PipeLineCommandExecutor(pipeLineCommand [][]string) ([]string, error) {
output, err = command.CombinedOutput()
if err != nil {
log.ErrorF("Pipeline Command Exec Error => %v", err.Error())
log.ErrorF("Pipeline Command Command Error => %v", err.Error())
// 收集错误的信息
resultSlice = append(resultSlice, "↓↓↓ 命令 错误 如下 ↓↓↓", string(output))