diff --git a/test/e2e/functional/tty.yaml b/test/e2e/functional/tty.yaml index 2d59292e50cc2..6d58236e4e4d5 100644 --- a/test/e2e/functional/tty.yaml +++ b/test/e2e/functional/tty.yaml @@ -21,7 +21,7 @@ spec: source: | if [[ ! -t 0 ]]; then echo "I should be in a terminal but I'm not" - exit 1 + exit 4 fi - name: tty-false @@ -31,5 +31,5 @@ spec: source: | if [[ -t 0 ]]; then echo "I should not be in a terminal but I am" - exit 1 + exit 4 fi diff --git a/workflow/executor/os-specific/command.go b/workflow/executor/os-specific/command.go index d05e74e43bdf6..c954d0abcf3d2 100644 --- a/workflow/executor/os-specific/command.go +++ b/workflow/executor/os-specific/command.go @@ -5,6 +5,7 @@ import ( "os" "os/exec" + log "github.com/sirupsen/logrus" "golang.org/x/term" ) @@ -18,5 +19,7 @@ func simpleStart(cmd *exec.Cmd) (func(), error) { func isTerminal(stdin io.Reader) bool { f, ok := stdin.(*os.File) + + log.WithField("argo", true).WithField("ok", ok).WithField("isterm", term.IsTerminal(int(f.Fd()))).Warn("checking term status of stdin") return ok && term.IsTerminal(int(f.Fd())) }