From 8b40a55da164011cda2e86922a435e4c47ba7bf7 Mon Sep 17 00:00:00 2001 From: Chris Wu Date: Fri, 17 Nov 2023 17:29:33 -0800 Subject: [PATCH] FAI-8527 - Fix config redaction when one-letter filenames are present --- airbyte-local.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/airbyte-local.sh b/airbyte-local.sh index ea4cd28..501df6c 100755 --- a/airbyte-local.sh +++ b/airbyte-local.sh @@ -406,9 +406,10 @@ function redactConfigSecrets() { | map(select(. != "properties" and . != "oneOf" and . != "anyOf" and - (.|tostring|test("^\\d+$")|not)))' <<< "$config_properties")) + (.|tostring|test("^\\d+$")|not))) | tostring' <<< "$config_properties")) for path in "${paths_to_redact[@]}"; do\ - loggable_config="$(jq -c --argjson path "$path" 'if getpath($path) != null then setpath($path; "REDACTED") else . end' <<< "$loggable_config")" + path_json=$(echo $path | jq -c '.|fromjson') + loggable_config="$(jq -c --argjson path "$path_json" 'if getpath($path) != null then setpath($path; "REDACTED") else . end' <<< "$loggable_config")" done echo "$loggable_config" }