Handle the existence of TRAMPOLINE_FILE consistently.

We can't assume having that set means we're trampolining.

Fixes #2342.
This commit is contained in:
Phil Hagelberg 2017-10-27 12:21:04 -07:00
parent b06e85ba5e
commit c837391260
3 changed files with 12 additions and 33 deletions

View file

@ -364,20 +364,11 @@ 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
if [ "$TRAMPOLINE" = "" ]; then
exit $EXIT_CODE
else
exec sh -c "exec $TRAMPOLINE"
fi
else
TRAMPOLINE="$(cat "$TRAMPOLINE_FILE")"
if [ "$TRAMPOLINE" = "" ]; then
exit $EXIT_CODE
else
exec sh -c "exec $TRAMPOLINE"
fi
fi
fi

View file

@ -130,13 +130,10 @@ else
EXIT_CODE=$?
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"
else
TRAMPOLINE="$(cat "$TRAMPOLINE_FILE")"
if [ "$TRAMPOLINE" = "" ]; then
exit $EXIT_CODE
else
exec sh -c "exec $TRAMPOLINE"
fi
fi

View file

@ -210,19 +210,10 @@ 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
if [ "$TRAMPOLINE" = "" ]; then
exit $EXIT_CODE
else
exec sh -c "exec $TRAMPOLINE"
fi
else
TRAMPOLINE="$(cat "$TRAMPOLINE_FILE")"
if [ "$TRAMPOLINE" = "" ]; then
exit $EXIT_CODE
else
exec sh -c "exec $TRAMPOLINE"
fi
fi