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

bun init: ask to continue if package.json already exists and add --force flag #16361

Open
fel1x-developer opened this issue Jan 12, 2025 · 0 comments
Labels
enhancement New feature or request

Comments

@fel1x-developer
Copy link
Contributor

What is the problem this feature would solve?

Instead of the current behaviour, Bun should rather warn that package.json already exists and if the user wants to override.
Add --force flag so users can ignore warnings.

What is the feature you are proposing to solve the problem?

When a directory is already initialized by Bun,

bun init
A package.json was found here. Would you like to configure
Done! A package.json file was saved in the current directory.

To get started, run:
  bun run index.ts

This message sounds weird.

What alternatives have you considered?

Don't warn at all like npm init does when package.json already exists.

@fel1x-developer fel1x-developer added the enhancement New feature or request label Jan 12, 2025
@RiskyMH RiskyMH marked this as a duplicate of #7447 Jan 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant