mirror of
https://github.com/rust-lang/cargo.git
synced 2025-10-01 11:30:39 +00:00
Fix typo in variable name
This commit is contained in:
parent
ac32aa812b
commit
0cf3a2289e
@ -514,31 +514,31 @@ pub fn init(opts: &NewOptions, config: &Config) -> CargoResult<NewProjectKind> {
|
||||
let mut version_control = opts.version_control;
|
||||
|
||||
if version_control == None {
|
||||
let mut num_detected_vsces = 0;
|
||||
let mut num_detected_vcses = 0;
|
||||
|
||||
if path.join(".git").exists() {
|
||||
version_control = Some(VersionControl::Git);
|
||||
num_detected_vsces += 1;
|
||||
num_detected_vcses += 1;
|
||||
}
|
||||
|
||||
if path.join(".hg").exists() {
|
||||
version_control = Some(VersionControl::Hg);
|
||||
num_detected_vsces += 1;
|
||||
num_detected_vcses += 1;
|
||||
}
|
||||
|
||||
if path.join(".pijul").exists() {
|
||||
version_control = Some(VersionControl::Pijul);
|
||||
num_detected_vsces += 1;
|
||||
num_detected_vcses += 1;
|
||||
}
|
||||
|
||||
if path.join(".fossil").exists() {
|
||||
version_control = Some(VersionControl::Fossil);
|
||||
num_detected_vsces += 1;
|
||||
num_detected_vcses += 1;
|
||||
}
|
||||
|
||||
// if none exists, maybe create git, like in `cargo new`
|
||||
|
||||
if num_detected_vsces > 1 {
|
||||
if num_detected_vcses > 1 {
|
||||
anyhow::bail!(
|
||||
"more than one of .hg, .git, .pijul, .fossil configurations \
|
||||
found and the ignore file can't be filled in as \
|
||||
|
Loading…
x
Reference in New Issue
Block a user