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

Support for 'cargo init --force' that overwrites existing files #3832

Closed
sbuller opened this issue Mar 15, 2017 · 5 comments
Closed

Support for 'cargo init --force' that overwrites existing files #3832

sbuller opened this issue Mar 15, 2017 · 5 comments
Labels
C-feature-request Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted` Command-init S-propose-close Status: A team member has nominated this for closing, pending further input from the team

Comments

@sbuller
Copy link

sbuller commented Mar 15, 2017

Every time I run cargo init I forget the --bin option. I'd prefer an alternative to rm -rf *; cargo init --bin. Alternatively, a n00b mode might be helpful. I'd appreciate it if a bare cargo init stopped to ask me if I'd forgotten the --bin like a n00b again.

@carols10cents carols10cents changed the title Support for '--force --i-didnt-actually-want-a-library --please-I-really-mean-it' options to 'cargo init --bin' Support for 'cargo init --force' that overwrites existing files Oct 2, 2017
@carols10cents carols10cents added C-feature-request Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted` Command-init labels Oct 2, 2017
@dwijnand dwijnand assigned dwijnand and unassigned dwijnand Mar 2, 2019
@epage
Copy link
Contributor

epage commented Oct 11, 2023

--bin is now the default but the point still stands ;)

The differences between bins and libs shrunk a little in that we make the Cargo.lock the same.

Deciding what to overwrite with a --force seems dubious. I think I'd prefer to explore cargo init being additive.

@epage epage added the S-triage Status: This issue is waiting on initial triage. label Oct 11, 2023
@weihanglo
Copy link
Member

As of now, cargo init doesn't really generate many files. I doubt it worth making it additive. That said, when cargo gets cargo-template support (#5151), this might be quite interesting to explore.

@epage
Copy link
Contributor

epage commented Oct 12, 2023

@weihanglo are you then leaning towards "close"? If so, I think thats fine as well.

@weihanglo weihanglo added S-propose-close Status: A team member has nominated this for closing, pending further input from the team and removed S-triage Status: This issue is waiting on initial triage. labels Oct 12, 2023
@weihanglo
Copy link
Member

Yes. I am going propose to close this to the cargo team. This looks a feature likely to be an extension of cargo-template.

@epage
Copy link
Contributor

epage commented Oct 12, 2023

I second.

@epage epage closed this as not planned Won't fix, can't repro, duplicate, stale Oct 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-feature-request Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted` Command-init S-propose-close Status: A team member has nominated this for closing, pending further input from the team
Projects
None yet
Development

No branches or pull requests

5 participants