[M3devel] m3cc often succeeds when it should fail

Jay K jay.krell at cornell.edu
Fri Aug 27 09:01:57 CEST 2010


I finally looked into this.

The reason is that the exit code of a pipeline is the last command.
Seems kind of dumb and I don't like any of the options.
I like having tee in there to save a log.

There is a way to deal it with bash, zsh, and it takes a big function to do it in standard sh.

Maybe q_exec or m3_exec?
It looks like no.

I suppose we could wrap up everything in a .sh file, detect bash 3 or newer, and use set -o pipefail?

 - Jay
 		 	   		  


More information about the M3devel mailing list