[Agent] [Executor] 优化Functional Executor
This commit is contained in:
@@ -57,7 +57,7 @@ func Execute(em *ExecutionMessage) ([]string, error) {
|
||||
realCommand = em.MultiLineCommand
|
||||
} else {
|
||||
// 单行命令
|
||||
resultLog, err = AllOutputCommandExecutor(em.SingleLineCommand)
|
||||
resultLog, err = FormatAllCommandExecutor(em.SingleLineCommand)
|
||||
realCommand = [][]string{em.SingleLineCommand}
|
||||
}
|
||||
}
|
||||
@@ -117,7 +117,7 @@ func MultiLineCommandExecutor(multiLineCommandExecutor [][]string) ([]string, er
|
||||
|
||||
var res []string
|
||||
for _, singleLineCommand := range multiLineCommandExecutor {
|
||||
singleLogs, err := AllOutputCommandExecutor(singleLineCommand)
|
||||
singleLogs, err := FormatAllCommandExecutor(singleLineCommand)
|
||||
res = append(res, singleLogs...)
|
||||
if err != nil {
|
||||
log.Error(fmt.Sprintf("Execution error ! command is %v, error is %v", singleLineCommand, err))
|
||||
|
||||
Reference in New Issue
Block a user