Skip to content

Require --force for Reinstalling Commands#16

Merged
gifflet merged 1 commit intomainfrom
fix/install-force-and-shared-remove
Jul 21, 2025
Merged

Require --force for Reinstalling Commands#16
gifflet merged 1 commit intomainfrom
fix/install-force-and-shared-remove

Conversation

@gifflet
Copy link
Owner

@gifflet gifflet commented Jul 21, 2025

This PR tightens safety around duplicate installs and reduces code duplication:

  • Safe reinstall: If a repository is already installed under any name, ccmd install now errors unless --force is provided.
  • Shared cleanup: New removeCommandFiles() consolidates directory + .md removal; used by both install (force paths) and remove.
  • Maintenance: Removed excessive inline comments and trimmed struct field docs for readability.

…logic

- Install: return clear AlreadyExists error unless --force when repo already installed
- Support renaming on force reinstall; remove old command via shared helper
- Improve success messaging when rename occurs
- Refactor: extract removeCommandFiles() used by install/remove paths
- Clean up noisy comments & minor struct field docs
@sonarqubecloud
Copy link

@gifflet gifflet merged commit 2b87cfb into main Jul 21, 2025
7 checks passed
@gifflet gifflet deleted the fix/install-force-and-shared-remove branch July 21, 2025 23:17
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.

1 participant