From bf9006d9c44482a56545d7d5c193420514940044 Mon Sep 17 00:00:00 2001 From: Adam Butler <85082674+adam248@users.noreply.github.com> Date: Tue, 22 Nov 2022 12:38:33 +0930 Subject: [PATCH 1/4] add newline to `cargo install .` error message for easier reading. --- src/cargo/ops/cargo_install.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cargo/ops/cargo_install.rs b/src/cargo/ops/cargo_install.rs index dd22cc8efb6..ea933ce0814 100644 --- a/src/cargo/ops/cargo_install.rs +++ b/src/cargo/ops/cargo_install.rs @@ -69,7 +69,7 @@ impl<'cfg, 'a> InstallablePackage<'cfg, 'a> { if name == "." { bail!( "To install the binaries for the package in current working \ - directory use `cargo install --path .`. \ + directory use `cargo install --path .`. \n\ Use `cargo build` if you want to simply build the package." ) } From c5836e97ba3d8c91bfbd55201a2635ac7e40a335 Mon Sep 17 00:00:00 2001 From: Adam Butler <85082674+adam248@users.noreply.github.com> Date: Tue, 22 Nov 2022 13:19:05 +0930 Subject: [PATCH 2/4] fixed broken error made by newline char in `cargo install .` error message --- tests/testsuite/install.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/testsuite/install.rs b/tests/testsuite/install.rs index dc473c7198f..65014afdf9d 100644 --- a/tests/testsuite/install.rs +++ b/tests/testsuite/install.rs @@ -329,8 +329,8 @@ fn missing_current_working_directory() { .with_stderr( "\ error: To install the binaries for the package in current working \ -directory use `cargo install --path .`. Use `cargo build` if you \ -want to simply build the package. +directory use `cargo install --path .`. \n\ +Use `cargo build` if you want to simply build the package. ", ) .run(); From db0d3f9de1c925a4c260c26db631ff1dcb1507ba Mon Sep 17 00:00:00 2001 From: Adam Butler <85082674+adam248@users.noreply.github.com> Date: Tue, 22 Nov 2022 13:24:59 +0930 Subject: [PATCH 3/4] fixed cargo fmt error regarding unknown escape char. --- tests/testsuite/install.rs | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/tests/testsuite/install.rs b/tests/testsuite/install.rs index 65014afdf9d..0d072e1ce3b 100644 --- a/tests/testsuite/install.rs +++ b/tests/testsuite/install.rs @@ -327,11 +327,9 @@ fn missing_current_working_directory() { cargo_process("install .") .with_status(101) .with_stderr( - "\ -error: To install the binaries for the package in current working \ -directory use `cargo install --path .`. \n\ -Use `cargo build` if you want to simply build the package. -", + "To install the binaries for the package in current working \ + directory use `cargo install --path .`. \n\ + Use `cargo build` if you want to simply build the package.", ) .run(); } From 1b7e2564130f13bbd66a6baaca76163974c3781b Mon Sep 17 00:00:00 2001 From: Adam Butler Date: Tue, 22 Nov 2022 14:14:29 +0930 Subject: [PATCH 4/4] fixed typo causing broken `cargo install .` test case --- tests/testsuite/install.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/testsuite/install.rs b/tests/testsuite/install.rs index 0d072e1ce3b..ebfe10560f6 100644 --- a/tests/testsuite/install.rs +++ b/tests/testsuite/install.rs @@ -327,7 +327,7 @@ fn missing_current_working_directory() { cargo_process("install .") .with_status(101) .with_stderr( - "To install the binaries for the package in current working \ + "error: To install the binaries for the package in current working \ directory use `cargo install --path .`. \n\ Use `cargo build` if you want to simply build the package.", )