Skip to content

Commit

Permalink
FAI-8527 - Fix config redaction when one-letter filenames are present (
Browse files Browse the repository at this point in the history
  • Loading branch information
cjwooo authored Nov 18, 2023
1 parent a22966a commit 6b44e2d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions airbyte-local.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
Expand Down

0 comments on commit 6b44e2d

Please sign in to comment.