From de0708af3bd0dfb121734244c7d3fb51723c5590 Mon Sep 17 00:00:00 2001 From: Elana Hashman Date: Sun, 26 Nov 2017 23:59:48 -0500 Subject: [PATCH] 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. --- bin/lein | 1 + 1 file changed, 1 insertion(+) diff --git a/bin/lein b/bin/lein index 4dcb2531..9a860ee7 100755 --- a/bin/lein +++ b/bin/lein @@ -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"