Quiet down the noisiness on empty array deref in post-checkout hook

Patch by Josh McKenzie; reviewed by David Capwell for CASSANDRA-21364

Follow-up patch
This commit is contained in:
Josh McKenzie 2026-05-11 16:50:04 -04:00
parent f55c4d2a9b
commit 84016ab151
1 changed files with 3 additions and 3 deletions

View File

@ -36,13 +36,13 @@ _main() {
return 0 return 0
fi fi
local extra_args=() local extra_args=""
if [[ -n "${BUILD_OFFLINE:-}" ]]; then if [[ -n "${BUILD_OFFLINE:-}" ]]; then
echo "BUILD_OFFLINE is defined; using --no-fetch for submodule updates (local SHAs only)." echo "BUILD_OFFLINE is defined; using --no-fetch for submodule updates (local SHAs only)."
echo "If your submodules are not already available locally, expect this to error out." echo "If your submodules are not already available locally, expect this to error out."
extra_args+=(--no-fetch) extra_args="--no-fetch"
fi fi
git submodule update --init --recursive "${extra_args[@]}" git submodule update --init --recursive ${extra_args:-}
} }
_main "$@" _main "$@"