charm
charm copied to clipboard
`charmc`: exit code 0 on error in charmxi
Hi,
There is no set -o pipefail in charmc. Therefore, this pipe:
https://github.com/UIUC-PPL/charm/blob/738c09c9e845f2ec82c491f10a27f82729a847a5/src/scripts/charmc#L1915
can cause charmc to exit with status code 0, even when charmxi fails
Hmm, I seems you'd also need a set -e for the set -o pipefail to work.
Another solution would be to use a temporary file to split the two commands
Do $CMK_CPP_CHARM $OPTS_CPP $FILE -o $FILE.i
Do $CHARMBIN/charmxi $XIOPTS -orig-file $FILE $FILE.i
# original: Do $CMK_CPP_CHARM $OPTS_CPP $FILE | Do $CHARMBIN/charmxi $XIOPTS -orig-file $FILE