dockerfiles
dockerfiles copied to clipboard
Error and quit if an unset variable is used in functions.
Helps avoid rm -rf ${VAR}/* wiping /* if $VAR is not set, as it could wipe out mountpoints.
A few variables such as GITHUB_TOKEN are impacted, this PR will gradually build over time to ensure variables are declared before being used.
this PR will gradually build over time to ensure variables are declared before being used
What do you mean?
GITHUB_TOKEN is currently not set anywhere, but we check if it's set with if [ -n "${GITHUB_TOKEN}" ].
That would not work with this -u flag and would exit the script. We should declare that and other variables in env files before use.