File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -67,13 +67,13 @@ cleanup() {
6767}
6868trap cleanup EXIT
6969
70- strict_args=( )
70+ runtime_args=(--codex-home " $CODEX_HOME_DIR " )
7171if [ " $STRICT_RUNTIME " -eq 1 ]; then
72- strict_args +=(--strict-runtime)
72+ runtime_args +=(--strict-runtime)
7373fi
7474
75- scripts/install_system_codex.sh --dry-run --codex-home " $CODEX_HOME_DIR " " ${strict_args [@]}"
76- scripts/install_system_codex.sh --apply --codex-home " $CODEX_HOME_DIR " " ${strict_args [@]}"
75+ scripts/install_system_codex.sh --dry-run " ${runtime_args [@]}"
76+ scripts/install_system_codex.sh --apply " ${runtime_args [@]}"
7777python3 scripts/validate_codex_mcp_env_forwarding.py --codex-home " $CODEX_HOME_DIR "
7878
7979python3 - " $CODEX_HOME_DIR " << 'PY '
@@ -138,7 +138,7 @@ if [ "$MODE" = "static" ]; then
138138 exit 0
139139fi
140140
141- scripts/doctor_system_codex.sh --quick --codex-home " $CODEX_HOME_DIR " " ${strict_args [@]}"
141+ scripts/doctor_system_codex.sh --quick " ${runtime_args [@]}"
142142if command -v codex > /dev/null 2>&1 ; then
143143 CODEX_HOME=" $CODEX_HOME_DIR " scripts/validate_execpolicy_rules.sh " $CODEX_HOME_DIR /rules"
144144 CODEX_HOME=" $CODEX_HOME_DIR " python3 scripts/smoke_codex_hook_listing.py --codex-home " $CODEX_HOME_DIR "
Original file line number Diff line number Diff line change 1+ from pathlib import Path
2+
3+
4+ ROOT = Path (__file__ ).resolve ().parents [2 ]
5+
6+
7+ def test_runtime_validator_never_expands_an_empty_array_under_nounset () -> None :
8+ script = (ROOT / "scripts/validate_runtime.sh" ).read_text (encoding = "utf-8" )
9+ assert 'runtime_args=(--codex-home "$CODEX_HOME_DIR")' in script
10+ assert "runtime_args+=(--strict-runtime)" in script
11+ assert '"${runtime_args[@]}"' in script
12+ assert "strict_args=()" not in script
You can’t perform that action at this time.
0 commit comments