Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 9 additions & 7 deletions docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,22 @@ fi
# This allows passing OAuth tokens from host (especially macOS where they're in Keychain)
if [ -n "$CLAUDE_OAUTH_CREDENTIALS" ]; then
echo "$CLAUDE_OAUTH_CREDENTIALS" > /home/automaker/.claude/.credentials.json
chmod 600 /home/automaker/.claude/.credentials.json
chmod 600 /home/automaker/.claude/.credentials.json 2>/dev/null || true
fi

# Fix permissions on Claude CLI config directory
chown -R automaker:automaker /home/automaker/.claude
chmod 700 /home/automaker/.claude
# Suppress errors for bind-mounted host directories (macOS can't change ownership)
chown -R automaker:automaker /home/automaker/.claude 2>/dev/null || true
chmod -R 700 /home/automaker/.claude 2>/dev/null || true

# Ensure Cursor CLI config directory exists with correct permissions
# This handles both: mounted volumes (owned by root) and empty directories
if [ ! -d "/home/automaker/.cursor" ]; then
mkdir -p /home/automaker/.cursor
fi
chown -R automaker:automaker /home/automaker/.cursor
chmod -R 700 /home/automaker/.cursor
# Suppress errors for bind-mounted host directories (macOS can't change ownership)
chown -R automaker:automaker /home/automaker/.cursor 2>/dev/null || true
chmod -R 700 /home/automaker/.cursor 2>/dev/null || true

# If CURSOR_AUTH_TOKEN is set, write it to the cursor auth file
# On Linux, cursor-agent uses ~/.config/cursor/auth.json for file-based credential storage
Expand All @@ -37,8 +39,8 @@ if [ -n "$CURSOR_AUTH_TOKEN" ]; then
"accessToken": "$CURSOR_AUTH_TOKEN"
}
EOF
chmod 600 "$CURSOR_CONFIG_DIR/auth.json"
chown -R automaker:automaker /home/automaker/.config
chmod 600 "$CURSOR_CONFIG_DIR/auth.json" 2>/dev/null || true
chown -R automaker:automaker /home/automaker/.config 2>/dev/null || true
fi

# Switch to automaker user and execute the command
Expand Down
Loading