diff --git a/lib/jeannie/core.sh b/lib/jeannie/core.sh index f9adbb1..102f03c 100644 --- a/lib/jeannie/core.sh +++ b/lib/jeannie/core.sh @@ -107,7 +107,15 @@ jeannie_step_latest_progress_line() { } redact_sensitive_output() { - sed -E \ + # Redact before logging, but flush each line so quiet/long-running Helm + # operations do not leave the progress display on a buffered plan line. + local -a sed_args=(-E) + if [[ "$(uname -s)" == "Darwin" ]]; then + sed_args+=(-l) + else + sed_args+=(-u) + fi + sed "${sed_args[@]}" \ -e 's/(GITEA_BOOTSTRAP_PASSWORD=)["'\'']?[^"'\''[:space:]]+["'\'']?/\1[REDACTED]/g' \ -e 's/(PIHOLE_WEBPASSWORD=)["'\'']?[^"'\''[:space:]]+["'\'']?/\1[REDACTED]/g' \ -e 's/(COSIGN_PASSWORD=)["'\'']?[^"'\''[:space:]]+["'\'']?/\1[REDACTED]/g' \