From 885ad4bc41ab1983a7cb3068a3dba79958f10b84 Mon Sep 17 00:00:00 2001 From: Dave Rolsky Date: Sun, 16 Feb 2025 10:38:19 -0600 Subject: [PATCH] Fix validator to always print input names with dashes in errors --- validate-inputs.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/validate-inputs.py b/validate-inputs.py index 65b2dd2..a23e58e 100755 --- a/validate-inputs.py +++ b/validate-inputs.py @@ -76,7 +76,9 @@ class InputValidator: # Validate boolean flags for flag in boolean_flags: if flag in self.inputs and self.inputs[flag] not in {"true", "false"}: - validation_errors.append(f"'{flag}' must be either 'true' or 'false'") + # Turn the underscores into dashes + dashes = flag.replace("_", "-") + validation_errors.append(f"'{dashes}' must be either 'true' or 'false'") # Validate rust-cache-parameters JSON if present if "rust_cache_parameters" in self.inputs: