From afb8882578e38fc27e6a987a1c62a4086e9bfa05 Mon Sep 17 00:00:00 2001 From: Jean Niklas L'orange Date: Tue, 16 Jul 2013 11:40:51 +0200 Subject: [PATCH] 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. --- bin/lein | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/bin/lein b/bin/lein index f9725444..f9fb803c 100755 --- a/bin/lein +++ b/bin/lein @@ -323,12 +323,18 @@ else stty icanon echo > /dev/null 2>&1 fi + ## TODO: [ -r "$TRAMPOLINE_FILE" ] may be redundant? A trampoline file + ## is always generated these days. if [ -r "$TRAMPOLINE_FILE" ] && [ "$LEIN_TRAMPOLINE_WARMUP" = "" ]; then TRAMPOLINE="$(cat $TRAMPOLINE_FILE)" if [ "$INPUT_CHECKSUM" = "" ]; then rm $TRAMPOLINE_FILE fi - exec sh -c "exec $TRAMPOLINE" + if [ "$TRAMPOLINE" = "" ]; then + exit $EXIT_CODE + else + exec sh -c "exec $TRAMPOLINE" + fi else exit $EXIT_CODE fi