From ecd1e5df0f9b84d95eeb013305dc43bdbd7e9bac Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Thu, 3 May 2018 14:05:21 +0300 Subject: [PATCH] Tweak error messages By convention, all errors should start with a lowercase letter --- src/cargo/util/config.rs | 2 +- tests/testsuite/bad_config.rs | 9 +++------ tests/testsuite/build.rs | 2 +- tests/testsuite/cargo_alias_config.rs | 3 +-- 4 files changed, 6 insertions(+), 10 deletions(-) diff --git a/src/cargo/util/config.rs b/src/cargo/util/config.rs index 263de41be..91cf39cc7 100644 --- a/src/cargo/util/config.rs +++ b/src/cargo/util/config.rs @@ -557,7 +557,7 @@ impl Config { cfg.merge(value) .chain_err(|| format!("failed to merge configuration at `{}`", path.display()))?; Ok(()) - }).chain_err(|| "Couldn't load Cargo configuration")?; + }).chain_err(|| "could not load Cargo configuration")?; self.load_credentials(&mut cfg)?; match cfg { diff --git a/tests/testsuite/bad_config.rs b/tests/testsuite/bad_config.rs index 574d84bff..1bdf2f307 100644 --- a/tests/testsuite/bad_config.rs +++ b/tests/testsuite/bad_config.rs @@ -61,7 +61,7 @@ fn bad2() { p.cargo("publish").arg("-v"), execs().with_status(101).with_stderr( "\ -[ERROR] Couldn't load Cargo configuration +[ERROR] could not load Cargo configuration Caused by: failed to load TOML configuration from `[..]config` @@ -164,10 +164,7 @@ fn bad5() { .cwd(&p.root().join("foo")), execs().with_status(101).with_stderr( "\ -[ERROR] Failed to create project `foo` at `[..]` - -Caused by: - Couldn't load Cargo configuration +[ERROR] could not load Cargo configuration Caused by: failed to merge configuration at `[..]` @@ -284,7 +281,7 @@ fn invalid_global_config() { p.cargo("build").arg("-v"), execs().with_status(101).with_stderr( "\ -[ERROR] Couldn't load Cargo configuration +[ERROR] could not load Cargo configuration Caused by: could not parse TOML configuration in `[..]` diff --git a/tests/testsuite/build.rs b/tests/testsuite/build.rs index 12cdd8ae7..bba6fd263 100644 --- a/tests/testsuite/build.rs +++ b/tests/testsuite/build.rs @@ -2913,7 +2913,7 @@ fn bad_cargo_config() { foo.cargo("build").arg("-v"), execs().with_status(101).with_stderr( "\ -[ERROR] Couldn't load Cargo configuration +[ERROR] could not load Cargo configuration Caused by: could not parse TOML configuration in `[..]` diff --git a/tests/testsuite/cargo_alias_config.rs b/tests/testsuite/cargo_alias_config.rs index 3eb1a0bf6..adeb12787 100644 --- a/tests/testsuite/cargo_alias_config.rs +++ b/tests/testsuite/cargo_alias_config.rs @@ -84,8 +84,7 @@ fn alias_config() { "\ [COMPILING] foo v0.5.0 [..] [RUNNING] `rustc --crate-name foo [..]", - ) - .stream(), + ), ); } -- 2.30.2