Fix removing sites when site folder is already removed#2705
Merged
Conversation
Collaborator
📊 Performance Test ResultsComparing eab1d80 vs trunk site-editor
site-startup
Results are median values from multiple test runs. Legend: 🟢 Improvement (faster) | 🔴 Regression (slower) | ⚪ No change (<50ms diff) |
fredrikekelund
approved these changes
Mar 6, 2026
Contributor
fredrikekelund
left a comment
There was a problem hiding this comment.
LGTM! Thanks for tackling this, @nightnei 👍
Comment on lines
+67
to
+68
| // Falls back to string comparison when either path doesn't exist (e.g., deleted directories), | ||
| // using case-insensitive comparison on macOS/Windows. |
Contributor
There was a problem hiding this comment.
Suggested change
| // Falls back to string comparison when either path doesn't exist (e.g., deleted directories), | |
| // using case-insensitive comparison on macOS/Windows. | |
| // Falls back to string comparison when either path doesn't exist (e.g., deleted directories). |
The second line looks like a leftover
Contributor
Author
There was a problem hiding this comment.
Forgot to update 🤦♂️ Thanks 👍
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Related issues
How AI was used in this PR
AI wrote code; I thoroughly reviewed it and did a few more iterations to polish the solution. I considered another solution (p1772624822355439/1772022345.939889-slack-C06DRMD6VPZ), but ultimately decided to go with this mutual proposition from AI and Fredrik (p1772626864886569/1772022345.939889-slack-C06DRMD6VPZ).
Proposed Changes
The issue - if user removed site folder manually, then
studio site deletefails and the site remains in thestudio site list.This PR fixes delete command in thsi case.
Testing Instructions
npm run cli:buildnode apps/cli/dist/cli/main.js site create --path=~/Studio/qqqrm -rf ~/Studio/qqqnode apps/cli/dist/cli/main.js site delete --path=~/Studio/qqq --filesSite files already removedis printed and no errors andnode apps/cli/dist/cli/main.js site listshows that the site was removed from StudioPre-merge Checklist