Skip to content

Commit

Permalink
fix: debug e2e ci failures
Browse files Browse the repository at this point in the history
Signed-off-by: Dana Pieluszczak <[email protected]>
  • Loading branch information
danajp committed Nov 30, 2022
1 parent ddca9cb commit ad6b2fa
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/e2e/functional/tty.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
3 changes: 3 additions & 0 deletions workflow/executor/os-specific/command.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (
"os"
"os/exec"

log "github.com/sirupsen/logrus"
"golang.org/x/term"
)

Expand All @@ -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()))
}

0 comments on commit ad6b2fa

Please sign in to comment.