fix: do not print command directly and instead use LogWarn to send to stdout
If we use the standard logging method from go-execute, any subprocess calls through plugn may capture the wrong output due to handling stdout.
This commit is contained in:
@@ -125,7 +125,11 @@ func CallExecCommandWithContext(ctx context.Context, input ExecCommandInput) (Ex
|
||||
}
|
||||
|
||||
if os.Getenv("DOKKU_TRACE") == "1" {
|
||||
cmd.PrintCommand = true
|
||||
argsSt := ""
|
||||
if len(cmd.Args) > 0 {
|
||||
argsSt = strings.Join(cmd.Args, " ")
|
||||
}
|
||||
LogWarn(fmt.Sprintf("exec: %s %s", cmd.Command, argsSt))
|
||||
}
|
||||
|
||||
if input.Stdin != nil {
|
||||
|
||||
Reference in New Issue
Block a user