Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(cli): --no-overwrite #5664

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

Tobbe
Copy link
Contributor

@Tobbe Tobbe commented Nov 1, 2024

Currently you can pass --overwrite to not be prompted about overwriting files and instead just always overwrite.
But there is no way to not be prompted, but to instead never overwrite.

This PR adds --no-overwrite to make it so that it never asks, it just assumes you always want to keep what you already have.

Specifying neither --overwrite nor --no-overwrite keeps the current behavior of asking the user if they want to overwrite or not.

This is a snippet of what the --help output looks like now

Options:
  -y, --yes          skip confirmation prompt. (default: false)
  -o, --overwrite    overwrite existing files. (default: ask)
  --no-overwrite     never overwrite existing files.

Copy link

vercel bot commented Nov 1, 2024

@Tobbe is attempting to deploy a commit to the shadcn-pro Team on Vercel.

A member of the Team first needs to authorize it.

@Tobbe
Copy link
Contributor Author

Tobbe commented Nov 1, 2024

You can try a build of shadcn with this change (plus my other PRs #5616 and #5599) here:
https://verdaccio.tobbe.dev/shadcn/-/shadcn-2.1.2-tobbe-20241101-0945.tgz

Copy link

@VictorTheCode VictorTheCode left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@shadcn
Copy link
Collaborator

shadcn commented Nov 3, 2024

Love this! I'll review.

@shadcn shadcn self-assigned this Nov 3, 2024
@shadcn shadcn added enhancement New feature or request area: shadcn area: roadmap This looks great. We'll add it to the roadmap, review and merge. labels Nov 3, 2024
Copy link

vercel bot commented Nov 3, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Skipped Deployment
Name Status Preview Updated (UTC)
ui ⬜️ Ignored (Inspect) Visit Preview Nov 3, 2024 7:18am

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: roadmap This looks great. We'll add it to the roadmap, review and merge. area: shadcn enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants