Created
December 11, 2014 11:17
-
-
Save NicolasT/b41366a3c1a30113c1c9 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/stack.sh b/stack.sh | |
| index ec13338..612cf73 100755 | |
| --- a/stack.sh | |
| +++ b/stack.sh | |
| @@ -388,6 +388,7 @@ if [[ -n "$LOGFILE" ]]; then | |
| # Set fd 3 to a copy of stdout. So we can set fd 1 without losing | |
| # stdout later. | |
| exec 3>&1 | |
| + exec 4>&2 | |
| if [[ "$VERBOSE" == "True" ]]; then | |
| # Set fd 1 and 2 to write the log file | |
| exec 1> >( $TOP_DIR/tools/outfilter.py -v -o "${LOGFILE}" ) 2>&1 | |
| @@ -409,6 +410,7 @@ else | |
| # Set fd 3 to a copy of stdout. So we can set fd 1 without losing | |
| # stdout later. | |
| exec 3>&1 | |
| + exec 4>&2 | |
| if [[ "$VERBOSE" != "True" ]]; then | |
| # Throw away stdout and stderr | |
| exec 1>/dev/null 2>&1 | |
| @@ -1505,6 +1507,6 @@ echo_summary "stack.sh completed in $SECONDS seconds." | |
| # Restore/close logging file descriptors | |
| exec 1>&3 | |
| -exec 2>&3 | |
| +exec 2>&4 | |
| exec 3>&- | |
| exec 6>&- |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment