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:
parent
b06e85ba5e
commit
c837391260
3 changed files with 12 additions and 33 deletions
17
bin/lein
17
bin/lein
|
@ -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
|
||||
|
|
11
bin/lein-pkg
11
bin/lein-pkg
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue