Skip to content

Conversation

@alex-feel
Copy link
Owner

Automatically remove npm-installed Claude Code after successful native installation to prevent PATH conflicts. This ensures only one Claude installation exists when users migrate from npm to native.

Implementation:

  • Add remove_npm_claude() function with safe error handling
  • Integrate at all 8 native installation success points
  • Only remove npm version after verified native installation (source == 'native')
  • Non-blocking design - npm removal failure does not fail native installation

Automatically remove npm-installed Claude Code after successful native installation to prevent PATH conflicts. This ensures only one Claude installation exists when users migrate from npm to native.

Implementation:
- Add remove_npm_claude() function with safe error handling
- Integrate at all 8 native installation success points
- Only remove npm version after verified native installation (source == 'native')
- Non-blocking design - npm removal failure does not fail native installation

Testing:
- Add TestRemoveNpmClaude class with 5 unit tests
- Fix 3 existing tests affected by the change with @patch decorator
@github-actions
Copy link

Coverage report

Click to see where and how coverage changed

FileStatementsMissingCoverageCoverage
(new stmts)
Lines missing
  scripts
  install_claude.py 1914-1915, 2019-2020, 2107-2108, 2173-2174, 2262-2263, 2333-2334, 2471-2478, 2505-2512
Project Total  

This report was generated by python-coverage-comment-action

@alex-feel alex-feel merged commit 3a49871 into main Jan 20, 2026
12 checks passed
@alex-feel alex-feel deleted the alex-feel-dev branch January 20, 2026 16:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants