Skip to content

Commit 201d57b

Browse files
abayertekton-robot
authored andcommitted
Fail steps on Windows with StdoutPath or StderrPath set
closes #5174 This fixes the release pipeline issue with building `cmd/entrypoint` on Windows, and returns an error if `StdoutPath` or `StderrPath` are specified in a Windows step. Signed-off-by: Andrew Bayer <[email protected]>
1 parent a4f9216 commit 201d57b

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

cmd/entrypoint/runner_windows.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ package main
2121

2222
import (
2323
"context"
24+
"errors"
2425
"os"
2526
"os/exec"
2627

@@ -32,11 +33,16 @@ import (
3233

3334
// realRunner actually runs commands.
3435
type realRunner struct {
36+
stdoutPath string
37+
stderrPath string
3538
}
3639

3740
var _ entrypoint.Runner = (*realRunner)(nil)
3841

3942
func (rr *realRunner) Run(ctx context.Context, args ...string) error {
43+
if rr.stdoutPath != "" || rr.stderrPath != "" {
44+
return errors.New("step.StdoutPath and step.StderrPath not supported on Windows")
45+
}
4046
if len(args) == 0 {
4147
return nil
4248
}

0 commit comments

Comments
 (0)