Skip to content

Commit

Permalink
Fix tty usage in tests when running on GitHub (#31)
Browse files Browse the repository at this point in the history
/dev/tty isn't available when running CI in GitHub via actions. However, `tty` does get us a usable tty.
  • Loading branch information
SeanTAllen authored Nov 8, 2019
1 parent db6e427 commit e832033
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,3 @@ The following command will download the latest nightly release of Ponyc and inst
ponyup update ponyc nightly
```


2 changes: 1 addition & 1 deletion test/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ check_output() {
cmd=$1
expected=$2

output=$(${cmd} | tee /dev/tty)
output=$(${cmd} | tee $(tty))
if ! echo "${output}" | grep -q "${expected}"; then
printf "\\033[1;91m ===> error:\\033[0m did not match \"%s\"\n" \
"${expected}"
Expand Down

0 comments on commit e832033

Please sign in to comment.