Respect --path in pull-reprint to overwrite or create a site at that location#3842
Draft
epeicher wants to merge 1 commit into
Draft
Respect --path in pull-reprint to overwrite or create a site at that location#3842epeicher wants to merge 1 commit into
epeicher wants to merge 1 commit into
Conversation
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
Claude Code (Opus 4.8) wrote the
--pathhandling and its tests; I drove the design decisions (when to overwrite vs. create, the PR base), reviewed the diff, and verified each routing mode live. Lint, typecheck, and thepull-reprintunit tests pass.Proposed Changes
studio pull-reprintignored--pathand always created a new site under~/Studio/<name-from-url>, so there was no way to pull into a chosen location or refresh an existing local site.The resolved path — an explicit
--path, or the current directory by default — now decides the target:studio pull— the site keeps its identity (same id, port, URL, settings) rather than becoming a new entry--path, no site there--path, current dir isn't a site~/Studio/<name-from-url>Overwriting replaces a site's files and database, so it asks for confirmation first (honoring
--yesand non-interactive callers) and leaves everything untouched if you decline.Testing Instructions
Needs a built CLI and
STUDIO_ENABLE_PULL_REPRINT=true. The path routing below is observable from the earlySite directory:/ prompt output; a full pull additionally needs a packaged build that bundlesreprint.phar.… pull-reprint --url <site> --path ~/Studio/my-new-site --verbose→Site directory: ~/Studio/my-new-site, site namedmy-new-site(not the URL default).--pathat a registered site's folder → prompt reads "This will overwrite the local site …"; declining leaves the site andcli.jsonuntouched.--pathfrom inside a registered site's directory → same overwrite prompt.--pathfrom a non-site directory → new site under~/Studio/<name-from-url>.npm test -- apps/cli/commands/tests/pull-reprint.test.tsPre-merge Checklist