diff --git a/changes/20250911152014.bugfix b/changes/20250911152014.bugfix new file mode 100644 index 0000000000..67bf1fd60c --- /dev/null +++ b/changes/20250911152014.bugfix @@ -0,0 +1 @@ +:bug: `subprocess` Make sure that newSubProcess supports overriding the stdin, stdout, and stderr diff --git a/utils/subprocess/executor.go b/utils/subprocess/executor.go index 54c0345d64..099a105d68 100644 --- a/utils/subprocess/executor.go +++ b/utils/subprocess/executor.go @@ -51,7 +51,7 @@ func NewWithEnvironmentWithIO(ctx context.Context, loggers logs.Loggers, io ICom // newSubProcess creates a subprocess description with custom IO func newSubProcess(ctx context.Context, loggers logs.Loggers, io ICommandIO, env []string, messageOnStart string, messageOnSuccess, messageOnFailure string, as *commandUtils.CommandAsDifferentUser, cmd string, args ...string) (p *Subprocess, err error) { p = new(Subprocess) - err = p.SetupAsWithEnvironment(ctx, loggers, env, messageOnStart, messageOnSuccess, messageOnFailure, as, cmd, args...) + err = p.SetupAsWithEnvironmentWithCustomIO(ctx, loggers, io, env, messageOnStart, messageOnSuccess, messageOnFailure, as, cmd, args...) return }