Skip to content

Commit

Permalink
Accept alternative Cargo manifests.
Browse files Browse the repository at this point in the history
  • Loading branch information
cutsoy committed Oct 15, 2020
1 parent 12db56c commit ebfc65c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/cargo/util/command_prelude.rs
Original file line number Diff line number Diff line change
Expand Up @@ -281,8 +281,9 @@ pub trait ArgMatchesExt {
// In general, we try to avoid normalizing paths in Cargo,
// but in this particular case we need it to fix #3586.
let path = paths::normalize_path(&path);
if !path.ends_with("Cargo.toml") {
anyhow::bail!("the manifest-path must be a path to a Cargo.toml file")
match path.file_name().map(|name| name.to_str()).flatten() {
Some(name) if name.starts_with("Cargo.") && name.ends_with(".toml") => {}
_ => anyhow::bail!("the manifest-path must be a path to a Cargo.toml file"),
}
if !path.exists() {
anyhow::bail!(
Expand Down

0 comments on commit ebfc65c

Please sign in to comment.