Avoid "You have $CLASSPATH set" errors on upgrade
When we exec the newly downloaded leiningen script, it will replace our current shell process and recalculate the classpath for us, so we can safely unset this here. This avoids the new script throwing warnings about the CLASSPATH variable being set (from the previous run) on upgrades.
This commit is contained in:
parent
db531846bf
commit
de0708af3b
1 changed files with 1 additions and 0 deletions
1
bin/lein
1
bin/lein
|
@ -285,6 +285,7 @@ elif [ "$1" = "upgrade" ] || [ "$1" = "downgrade" ]; then
|
||||||
echo "Leiningen is already up-to-date."
|
echo "Leiningen is already up-to-date."
|
||||||
fi
|
fi
|
||||||
mv "$TARGET" "$SCRIPT" && chmod +x "$SCRIPT"
|
mv "$TARGET" "$SCRIPT" && chmod +x "$SCRIPT"
|
||||||
|
unset CLASSPATH
|
||||||
exec "$SCRIPT" version
|
exec "$SCRIPT" version
|
||||||
else
|
else
|
||||||
download_failed_message "$LEIN_SCRIPT_URL"
|
download_failed_message "$LEIN_SCRIPT_URL"
|
||||||
|
|
Loading…
Reference in a new issue