somratpro Claude Haiku 4.5 commited on
Commit
6d97584
·
1 Parent(s): 316b8d3

Fix container exit when admin already configured

Browse files

set -euo pipefail kills the script when the bootstrap-ceo grep
pipeline returns no match (admin already exists). Previous fix
covered bootstrap-ceo itself but not the grep pipeline. Add
|| true at the end of the pipeline so empty INVITE_URL is fine.

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>

Files changed (1) hide show
  1. start.sh +1 -1
start.sh CHANGED
@@ -230,7 +230,7 @@ done
230
 
231
  if [ "$PAPERCLIP_READY" = true ]; then
232
  BOOTSTRAP_OUTPUT=$(pnpm paperclipai auth bootstrap-ceo 2>&1 || true)
233
- INVITE_URL=$(echo "$BOOTSTRAP_OUTPUT" | grep "Invite URL:" | sed 's/\x1B\[[0-9;]*[a-zA-Z]//g' | grep -o 'https\?://[^ ]*' | head -1)
234
  if [ -n "$INVITE_URL" ]; then
235
  echo "$INVITE_URL" > /tmp/invite-url.txt
236
  echo ""
 
230
 
231
  if [ "$PAPERCLIP_READY" = true ]; then
232
  BOOTSTRAP_OUTPUT=$(pnpm paperclipai auth bootstrap-ceo 2>&1 || true)
233
+ INVITE_URL=$(echo "$BOOTSTRAP_OUTPUT" | grep "Invite URL:" 2>/dev/null | sed 's/\x1B\[[0-9;]*[a-zA-Z]//g' | grep -o 'https\?://[^ ]*' | head -1 || true)
234
  if [ -n "$INVITE_URL" ]; then
235
  echo "$INVITE_URL" > /tmp/invite-url.txt
236
  echo ""