cli: add --init-skip-if-exists for anonymous dev init#380
Open
nicu-chiciuc wants to merge 1 commit intoget-convex:mainfrom
Open
cli: add --init-skip-if-exists for anonymous dev init#380nicu-chiciuc wants to merge 1 commit intoget-convex:mainfrom
nicu-chiciuc wants to merge 1 commit intoget-convex:mainfrom
Conversation
|
Very useful! |
Contributor
|
Hey @nicu-chiciuc - thanks for the contribution! This is honestly a good change to make default I think. Basically, unless the CLI is creating the Are you up for stripping down the PR functionality (no more flag) to align with that? |
Contributor
And for clarity, I mean however the command is executed (not limited to |
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.
Summary
convex devflag:--init-skip-if-existsdevCLI optionsdoInitConvexFolder(...)skipIfExists?: booleansupport todoInitConvexFolder(...)src/cli/lib/codegen.test.ts:convex/README.mdandconvex/tsconfig.jsonwhenskipIfExistsis enabledMotivation
In anonymous local dev flows (e.g.
CONVEX_AGENT_MODE=anonymous npx convex dev --once), users may want to avoid overwriting existingconvex/README.mdandconvex/tsconfig.jsonin worktrees.This change provides an opt-in guard without changing existing defaults.
Usage