From: Aleksey Kladov Date: Thu, 8 Mar 2018 19:33:10 +0000 (+0300) Subject: Fix verify-project command X-Git-Tag: archive/raspbian/0.35.0-2+rpi1~3^2^2^2^2^2^2^2~22^2~2^2~47^2~32 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=63d4e5c8b2eabd1bc45da77764d34c360d4d5a56;p=cargo.git Fix verify-project command --- diff --git a/src/bin/cli/mod.rs b/src/bin/cli/mod.rs index 40bfe09b8..775d077f4 100644 --- a/src/bin/cli/mod.rs +++ b/src/bin/cli/mod.rs @@ -474,7 +474,10 @@ pub fn do_main(config: &mut Config) -> Result<(), CliError> { } let mut contents = String::new(); - let filename = root_manifest_from_args(config, args)?; + let filename = match root_manifest_from_args(config, args) { + Ok(filename) => filename, + Err(e) => fail("invalid", &e.to_string()), + }; let file = File::open(&filename); match file.and_then(|mut f| f.read_to_string(&mut contents)) { diff --git a/tests/testsuite/bad_manifest_path.rs b/tests/testsuite/bad_manifest_path.rs index b8cfe6c31..5673f0076 100644 --- a/tests/testsuite/bad_manifest_path.rs +++ b/tests/testsuite/bad_manifest_path.rs @@ -312,7 +312,6 @@ fn update_dir_to_nonexistent_cargo_toml() { } #[test] -#[ignore] fn verify_project_dir_containing_cargo_toml() { let p = project("foo") .file("Cargo.toml", &basic_bin_manifest("foo")) @@ -329,7 +328,6 @@ fn verify_project_dir_containing_cargo_toml() { } #[test] -#[ignore] fn verify_project_dir_plus_file() { let p = project("foo") .file("Cargo.toml", &basic_bin_manifest("foo")) @@ -346,7 +344,6 @@ fn verify_project_dir_plus_file() { } #[test] -#[ignore] fn verify_project_dir_plus_path() { let p = project("foo") .file("Cargo.toml", &basic_bin_manifest("foo")) @@ -363,7 +360,6 @@ fn verify_project_dir_plus_path() { } #[test] -#[ignore] fn verify_project_dir_to_nonexistent_cargo_toml() { let p = project("foo").build(); assert_that(p.cargo("verify-project")