From 0fd6f1c1423f7f7ffa916149198a9e255d1a838b Mon Sep 17 00:00:00 2001 From: Pete Date: Thu, 2 Jul 2026 16:56:21 -0700 Subject: [PATCH] Fix welcomebot-signups: heredoc instead of -c string to avoid bash/python quote clash --- bin/welcomebot-signups | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/bin/welcomebot-signups b/bin/welcomebot-signups index a96b0ad..e0ff470 100755 --- a/bin/welcomebot-signups +++ b/bin/welcomebot-signups @@ -52,11 +52,11 @@ if ! docker inspect "$CONTAINER" >/dev/null 2>&1; then echo "welcomebot-signups: container '$CONTAINER' not found (is it deployed/running?)" >&2; exit 1 fi -docker exec \ +docker exec -i \ -e SIG_LIMIT="$limit" \ -e SIG_FLAGGED_ONLY="$flagged_only" \ -e SIG_ACCT="$acct_filter" \ - "$CONTAINER" python3 -c ' + "$CONTAINER" python3 <<'PYEOF' import os import sqlite3 @@ -81,7 +81,11 @@ rows = conn.execute(sql, params).fetchall() if not rows: print("(no matching signup records)") for acct, ip, classification, org, flagged, ipblock, ts in rows: + acct = acct or "" + ip = ip or "" + classification = classification or "" + org = org or "" flag = "FLAGGED" if flagged else "-" ipb = "ipblock=yes" if ipblock else "ipblock=no" - print(f"{ts} {acct or '':20s} {ip or '':16s} {classification or '':12s} {flag:8s} {ipb:12s} {org or ''}") -' + print(f"{ts} {acct:20s} {ip:16s} {classification:12s} {flag:8s} {ipb:12s} {org}") +PYEOF