Skip to content

Commit 3c0fda1

Browse files
ImTotemclaude
andcommitted
fix(infra): fix n8n credential duplicate check stderr handling
Redirect stderr to stdout in list:credential so grep matches even when n8n prints warnings to stderr. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 305bc62 commit 3c0fda1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

infra/scripts/init_n8n.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,9 @@ activate_workflow() {
5353

5454
setup_credential() {
5555
local existing
56-
existing=$($COMPOSE exec -T n8n n8n list:credential 2>/dev/null | grep -c "Google Sheets SA" || true)
56+
existing=$($COMPOSE exec -T n8n n8n list:credential 2>&1 | grep -c "Google Sheets SA" || true)
5757
if [ "$existing" -gt 0 ]; then
58-
echo " Google Sheets credential already exists — skipping"
58+
echo " Google Sheets credential already exists ($existing found) — skipping"
5959
return 0
6060
fi
6161
echo " Creating Google Sheets service account credential..."

0 commit comments

Comments
 (0)