Skip to content

Commit

Permalink
Fail steps on Windows with StdoutPath or StderrPath set
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
abayer authored and tekton-robot committed Jul 20, 2022
1 parent a4f9216 commit 201d57b
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions cmd/entrypoint/runner_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ package main

import (
"context"
"errors"
"os"
"os/exec"

Expand All @@ -32,11 +33,16 @@ import (

// realRunner actually runs commands.
type realRunner struct {
stdoutPath string
stderrPath string
}

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

func (rr *realRunner) Run(ctx context.Context, args ...string) error {
if rr.stdoutPath != "" || rr.stderrPath != "" {
return errors.New("step.StdoutPath and step.StderrPath not supported on Windows")
}
if len(args) == 0 {
return nil
}
Expand Down

0 comments on commit 201d57b

Please sign in to comment.