Fix verify-project command
authorAleksey Kladov <aleksey.kladov@gmail.com>
Thu, 8 Mar 2018 19:33:10 +0000 (22:33 +0300)
committerAleksey Kladov <aleksey.kladov@gmail.com>
Thu, 8 Mar 2018 20:31:56 +0000 (23:31 +0300)
src/bin/cli/mod.rs
tests/testsuite/bad_manifest_path.rs

index 40bfe09b8143a346f15f89dc3dc99f84c9099180..775d077f4982d6bd2b8e19cfd411d94dc470678b 100644 (file)
@@ -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)) {
index b8cfe6c317e12a818708f0e71c5613cefded03a1..5673f0076ba7c6182bc5a13b667f8760950d9c30 100644 (file)
@@ -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")