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

cargo new doesn’t handle empty directories #1065

Closed
nagisa opened this issue Dec 19, 2014 · 4 comments
Closed

cargo new doesn’t handle empty directories #1065

nagisa opened this issue Dec 19, 2014 · 4 comments

Comments

@nagisa
Copy link
Member

nagisa commented Dec 19, 2014

cargo new . or cargo new existing-directory doesn’t work even if the directory in question is empty.

This is filled again because #526 and #21 (comment) are already closed.

@vi
Copy link
Contributor

vi commented Sep 27, 2015

+1

$ mkdir rustquickchecktest
$ cd rustquickchecktest
$ cargo init
No such subcommand

    Did you mean `new`?

$ cargo new
Invalid arguments.

Usage:
    cargo new [options] <path>
    cargo new -h | --help
$ cargo new .
Destination `/home/vi/code/_/rustquickchecktest/.` already exists
$ cd ..
$ rmdir rustquickchecktest
$ cargo new rustquickchecktest
$ cd rustquickchecktest/ 

I'd like cargo init to be alias to cargo new, but also allowing pre-existing empty (or almost-empty, e.g. with .git/.gitignore) directory.

@alexcrichton
Copy link
Member

Oh this is actually a dupe of #21, so closing for that, certainly a desired feature!

@vi
Copy link
Contributor

vi commented Sep 28, 2015

There are many duplicates, but no pull requests, although the issue seems easy.

Are there some problem preventing cargo init or cargo new . to be done or it's just low priority?

@steveklabnik
Copy link
Member

steveklabnik commented Sep 28, 2015 via email

vi added a commit to vi/cargo that referenced this issue Sep 29, 2015
Allows "new" command even if path exists,
if the path is empty or almost empty directory.

Also more narrow duplicates: rust-lang#1990, rust-lang#1065, rust-lang#526.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants