From 63d4e5c8b2eabd1bc45da77764d34c360d4d5a56 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Thu, 8 Mar 2018 22:33:10 +0300 Subject: [PATCH] Fix verify-project command --- src/bin/cli/mod.rs | 5 ++++- tests/testsuite/bad_manifest_path.rs | 4 ---- 2 files changed, 4 insertions(+), 5 deletions(-) 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") -- 2.30.2