From 70fb074758414098bd9e09f693160d48feb2145e Mon Sep 17 00:00:00 2001 From: joshjennings98 Date: Thu, 11 Sep 2025 15:20:24 +0100 Subject: [PATCH] :bug: `subprocess` Make sure that newSubProcess supports overriding the stdin, stdout, and stderr --- changes/20250911152014.bugfix | 1 + utils/subprocess/executor.go | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 changes/20250911152014.bugfix 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 b32387ad14..6cca9a05f4 100644 --- a/utils/subprocess/executor.go +++ b/utils/subprocess/executor.go @@ -41,7 +41,7 @@ func NewWithEnvironment(ctx context.Context, loggers logs.Loggers, additionalEnv // newSubProcess creates a subprocess description. func newSubProcess(ctx context.Context, loggers logs.Loggers, 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 }