cygwin bash include scripting and error code return question

2012-03-25 Thread John Fairhall
Hi, I have a cygwin bash script running on 32 bit XP. I have a windows BAT script calling bash, like so: --- bash mainScript.sh 2>&1 | tee %LOGFILE% bash mailBuild.sh %ERRORLEVEL% %LOGFILE% --- What I was hoping was that bash would propagate the shell script's r

RE: cygwin bash include scripting and error code return question

2012-03-25 Thread John Fairhall
The pipe is definitely the problem. If I have this: bash mainScript.sh 2>&1 bash mailBuild.sh %ERRORLEVEL% %LOGFILE% When I gimmick mainScript to exit with any non-zero value I get an ERRORLEVEL of 255. However, when I do this: bash -o pipefail mainScript.sh 2>&1 | tee $LOGFILE bash mailBuild