Browse files

Fix file leak when not using fast trampolines.

  • Loading branch information...
1 parent 27ffe8b commit 5e82d1bcb8a1fac39712ce489b7af66d97d65c5c @technomancy committed Aug 17, 2012
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

0 comments on commit 5e82d1b

Please sign in to comment.