修复(CI红态追绿·fix-ci-mac续): 闸脚本run_all_gates.sh:367空数组展开bash bug——_user_args[@]在mac bash3.2×set -u下unbound variable四分片秒挂(测试未跑即红),改安全展开惯用法(空参归零不越set -u,非空照常传参); bash -n 过

This commit is contained in:
DKChan committed 2026-11-03 08:03:24 +08:00
1 parent c6fab7e9a5
commit 64ed22a9f5
1 file changed
+1 -1
+1 -1
View File
@@ -364,7 +364,7 @@ gate_unit() { # run_all 是 --script 模式,退出码为唯一判据;分
local k
for k in $(seq 1 "$_shards"); do
( cd "$REPO" && "$GODOT" --headless --path "$(gate_game_path "$GAME")" --script res://tests/run_all.gd \
-- "${_user_args[@]}" "--shard=$k" "--shard-count=$_shards" ) \
-- ${_user_args[@]:+"${_user_args[@]}"} "--shard=$k" "--shard-count=$_shards" ) \
>"$STAMP_DIR/unit_shard_$k.log" 2>&1 &
_pids+=($!)
done