spawn/shared
A 7b9912a7ca
Reduce code complexity by extracting helper functions (#1352)
Refactored two high-complexity functions to improve maintainability:

1. shared/common.sh: Extract install_claude_code() into 5 focused helpers:
   - _finalize_claude_install: Setup shell integration
   - _verify_claude_installed: Check if installation succeeded
   - _install_via_curl: Curl installer method
   - _ensure_nodejs_runtime: Node.js runtime setup
   - _install_via_bun: Bun installer method
   Main function now reads as a clear sequence of steps.

2. cli/src/commands.ts: Simplify credential checking in printQuickStart:
   - Extract checkAllCredentialsReady() for clarity
   - Extract printAuthVariableStatus() to handle auth var display
   - Extract buildCloudCommandHint() for cloud hint formatting
   Reduces complexity and improves readability.

All 80 tests pass. No functional changes.

Co-authored-by: spawn-bot <bot@openrouter.ai>
Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-02-16 20:26:15 -05:00
..
common.sh Reduce code complexity by extracting helper functions (#1352) 2026-02-16 20:26:15 -05:00
github-auth.sh refactor: decompose ensure_jq and ensure_gh_cli into focused helpers (#994) 2026-02-13 12:14:56 -08:00
key-request.sh fix: HIGH severity security issues (command injection + weak VNC password) (#1150) 2026-02-14 20:39:48 -05:00