Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fix file leak when not using fast trampolines.

  • Loading branch information...
commit 5e82d1bcb8a1fac39712ce489b7af66d97d65c5c 1 parent 27ffe8b
@technomancy authored
Showing with 6 additions and 2 deletions.
  1. +6 −2 bin/lein
View
8 bin/lein
@@ -230,7 +230,7 @@ else
TRAMPOLINE_FILE=`cygpath -w $TRAMPOLINE_FILE`
fi
- if [ "INPUT_CHECKSUM" != "" ] && [ -r "$TRAMPOLINE_FILE" ]; then
+ if [ "$INPUT_CHECKSUM" != "" ] && [ -r "$TRAMPOLINE_FILE" ]; then
exec sh -c "exec $(cat $TRAMPOLINE_FILE)"
else
$LEIN_JAVA_CMD \
@@ -246,7 +246,11 @@ else
EXIT_CODE=$?
if [ -r "$TRAMPOLINE_FILE" ]; then
- exec sh -c "exec $(cat $TRAMPOLINE_FILE)"
+ TRAMPOLINE="$(cat $TRAMPOLINE_FILE)"
+ if [ "$INPUT_CHECKSUM" = "" ]; then
+ rm $TRAMPOLINE_FILE
+ fi
+ exec sh -c "exec $TRAMPOLINE"
else
exit $EXIT_CODE
fi
Please sign in to comment.
Something went wrong with that request. Please try again.