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:
Elana Hashman 2017-11-26 23:59:48 -05:00
parent db531846bf
commit de0708af3b

View file

@ -285,6 +285,7 @@ elif [ "$1" = "upgrade" ] || [ "$1" = "downgrade" ]; then
echo "Leiningen is already up-to-date."
fi
mv "$TARGET" "$SCRIPT" && chmod +x "$SCRIPT"
unset CLASSPATH
exec "$SCRIPT" version
else
download_failed_message "$LEIN_SCRIPT_URL"