Exit if trampoline file is empty. Fixes #1254.

A consequence of this fix is that travis-ci will complain on errors and
fails again, and I expect this build to fail due to that very reason.
This commit is contained in:
Jean Niklas L'orange 2013-07-16 11:40:51 +02:00
parent 9bef321ece
commit afb8882578

View file

@ -323,12 +323,18 @@ else
stty icanon echo > /dev/null 2>&1 stty icanon echo > /dev/null 2>&1
fi fi
## TODO: [ -r "$TRAMPOLINE_FILE" ] may be redundant? A trampoline file
## is always generated these days.
if [ -r "$TRAMPOLINE_FILE" ] && [ "$LEIN_TRAMPOLINE_WARMUP" = "" ]; then if [ -r "$TRAMPOLINE_FILE" ] && [ "$LEIN_TRAMPOLINE_WARMUP" = "" ]; then
TRAMPOLINE="$(cat $TRAMPOLINE_FILE)" TRAMPOLINE="$(cat $TRAMPOLINE_FILE)"
if [ "$INPUT_CHECKSUM" = "" ]; then if [ "$INPUT_CHECKSUM" = "" ]; then
rm $TRAMPOLINE_FILE rm $TRAMPOLINE_FILE
fi fi
exec sh -c "exec $TRAMPOLINE" if [ "$TRAMPOLINE" = "" ]; then
exit $EXIT_CODE
else
exec sh -c "exec $TRAMPOLINE"
fi
else else
exit $EXIT_CODE exit $EXIT_CODE
fi fi