Remove env vars used by legacy build systems (#1120)

These variables were used by Anvil and/or the legacy `slug_compiler`
that predated cytokine.

I've not added a changelog entry since none were exported, so wouldn't
have been available to subprocesses anyway.

Closes @W-8387606@.

[skip changelog]
This commit is contained in:
Ed Morley
2020-11-12 18:40:31 +00:00
committed by GitHub
parent 71aef447a6
commit 6a914193b9
+1 -7
View File
@@ -73,19 +73,13 @@ RECOMMENDED_PYTHON_VERSION=$DEFAULT_PYTHON_VERSION
export PATH=$PATH:$ROOT_DIR/vendor/
# Set environment variables if they weren't set by the platform.
# Note: this is legacy, for a deprecated build system known as Anvil.
# This can likely be removed, with caution.
[ ! "$SLUG_ID" ] && SLUG_ID="defaultslug"
[ ! "$REQUEST_ID" ] && REQUEST_ID=$SLUG_ID
[ ! "$STACK" ] && STACK=$DEFAULT_PYTHON_STACK
# Sanitize externally-provided environment variables:
# The following environment variables are either problematic or simply unneccessary
# for the buildpack to have knowledge of, so we unset them, to keep the environment
# as clean and pristine as possible.
unset GIT_DIR PYTHONHOME PYTHONPATH
unset RECEIVE_DATA RUN_KEY BUILD_INFO DEPLOY LOG_TOKEN
unset CYTOKINE_LOG_FILE GEM_PATH
unset PYTHONHOME PYTHONPATH
# Import the utils script, which contains helper functions used throughout the buildpack.
# shellcheck source=bin/utils