From b4ddc0d26dbd4c5cce3515e72e4a3659370bf342 Mon Sep 17 00:00:00 2001 From: Jon Chen Date: Thu, 12 Oct 2023 01:50:19 +0800 Subject: [PATCH] fixed CLI vars to handle arrays in yaml --- solutions_builder/cli/vars.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/solutions_builder/cli/vars.py b/solutions_builder/cli/vars.py index 75c70307..2edb32bf 100644 --- a/solutions_builder/cli/vars.py +++ b/solutions_builder/cli/vars.py @@ -34,7 +34,7 @@ def replace_var_to_template(var_name, text, custom_template=False, debug=False): # For example: # PROJECT_ID: 12345 # sb-var:project_id # GCP_REGION = "us-central1" # sb-var:gcp_region - match_pattern = f"^([^\\r]*[:|=]\\s*)([\"\']?)([^\"^\']*)([\"\']?)\\s*#\\s*sb-var:{var_name}" + match_pattern = f"^([^\\r]*[:|=][\\s\-]*)([\"\']?)([^\"^\']*)([\"\']?)\\s*#\\s*sb-var:{var_name}" # This output patterh print the jinja2 template for the specific variable name. # For example: