Skip to content

Commit

Permalink
Auto merge of #11401 - adam248:patch-1, r=ehuss
Browse files Browse the repository at this point in the history
add newline char to `cargo install .` error message for easier reading.

I just noticed the `cargo install .` error message was not formatted very nicely.

Just added a newline char to make it cleaner.

Thanks
  • Loading branch information
bors committed Nov 25, 2022
2 parents ee755e7 + 1b7e256 commit 79fe757
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/cargo/ops/cargo_install.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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."
)
}
Expand Down
8 changes: 3 additions & 5 deletions tests/testsuite/install.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 .`. Use `cargo build` if you \
want to simply build the package.
",
"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.",
)
.run();
}
Expand Down

0 comments on commit 79fe757

Please sign in to comment.