From b14a99f7dfcc102e81a0f45c5a35d23ae1f43b72 Mon Sep 17 00:00:00 2001 From: Ed Morley <501702+edmorley@users.noreply.github.com> Date: Thu, 13 Nov 2025 12:01:44 +0000 Subject: [PATCH] Always use `local` for vars inside functions Adds a couple of stray missing `local` declarations for completeness. (Previously they were implicitly created as global via the `for` loop definition.) --- lib/checks.sh | 1 + vendor/buildpack-stdlib_v8.sh | 1 + 2 files changed, 2 insertions(+) diff --git a/lib/checks.sh b/lib/checks.sh index 36f7f2206..65c6727c9 100644 --- a/lib/checks.sh +++ b/lib/checks.sh @@ -105,6 +105,7 @@ function checks::existing_python_dir_present() { function checks::existing_venv_dir_present() { local build_dir="${1}" + local venv_name for venv_name in ".venv" "venv"; do if [[ -f "${build_dir}/${venv_name}/pyvenv.cfg" ]]; then diff --git a/vendor/buildpack-stdlib_v8.sh b/vendor/buildpack-stdlib_v8.sh index ad8558f06..8f82fc152 100755 --- a/vendor/buildpack-stdlib_v8.sh +++ b/vendor/buildpack-stdlib_v8.sh @@ -48,6 +48,7 @@ export_env() { local blacklist blacklist="$(_env_blacklist "${3:-}")" if [[ -d "${env_dir}" ]]; then + local e # Environment variable names won't contain characters affected by: # shellcheck disable=SC2045 for e in $(ls "${env_dir}"); do