]> git.proxmox.com Git - cargo.git/commit
[cargo_new] Hint to use `cargo init` on existing dir
authorBehnam Esfahbod <behnam@zwnj.org>
Mon, 7 Aug 2017 16:31:32 +0000 (09:31 -0700)
committerBehnam Esfahbod <behnam@zwnj.org>
Mon, 7 Aug 2017 17:13:18 +0000 (10:13 -0700)
commit484a33af8c0d6634cbe39fcd36362f50f95c01f3
treeaefee43c5054cf3d31c167f892fb45aea79b1fc7
parent18a86b00d2eaad454aba6053456c972d3ae54d95
[cargo_new] Hint to use `cargo init` on existing dir

The `new` command always expects a non-existing path. The `init` command
always expects an existing path. Therefore, it makes sense to hint to
use `init` if the pre-condition to `new` is not satisfied.

Fixes <https://github.com/rust-lang/cargo/issues/4366>
src/cargo/ops/cargo_new.rs
tests/new.rs