Skip to content

Commit db4409e

Browse files
fix: improve error handling for JSON parsing
2 parents 9fb8bc0 + d4bd501 commit db4409e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

infra/scripts/validate_bicep_params.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,8 @@ def parse_parameters_env_vars(json_path: Path) -> dict[str, list[str]]:
108108
data = json.loads(sanitized)
109109
params = data.get("parameters", {})
110110
except json.JSONDecodeError:
111-
pass
111+
# Best-effort behavior: if JSON cannot be parsed, treat as no env-var
112+
return result
112113

113114
# Walk each top-level parameter and scan its entire serialized value
114115
# for ${VAR} references from the original text.

0 commit comments

Comments
 (0)