Skip to content

Commit

Permalink
fix tty problem for build workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
nyxnor committed Dec 11, 2022
1 parent 25a930d commit f986e16
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions usr/bin/installer-dist
Expand Up @@ -2273,13 +2273,14 @@ parse_opt(){

## Logging mechanism.
log_term_and_file(){
## Send fd3 to the terminal
if test -t 1 && has tty; then
true "exec 3>$(tty)"
exec 3>>"$(tty)"
else
## Discover if terminal is attached to stdout
if ! test -t 1; then
true "Output is not being sent to the terminal because either tty program does not exist of because terminal is not connected to stdout."
return 0
fi
## Send fd3 to the terminal
true "exec 3>$(tty)"
exec 3>>"$(tty)"
## Current problem is that command-line option is necessary to hide stderr
## by sending it to /dev/null, while the desired method would be to avoid
## this workaround and simply be able to redirect with 2>/dev/null.
Expand Down

0 comments on commit f986e16

Please sign in to comment.