mirror of
https://github.com/rust-lang/cargo.git
synced 2025-09-28 11:20:36 +00:00
print the full destination path when no track duplicates
Signed-off-by: hi-rustin <rustin.liu@gmail.com>
This commit is contained in:
parent
c22756541a
commit
5da9bed1e5
@ -258,7 +258,13 @@ impl<'cfg, 'a> InstallablePackage<'cfg, 'a> {
|
||||
if !self.force && !duplicates.is_empty() {
|
||||
let mut msg: Vec<String> = duplicates
|
||||
.iter()
|
||||
.map(|(name, _)| format!("binary `{}` already exists in destination", name))
|
||||
.map(|(name, _)| {
|
||||
format!(
|
||||
"binary `{}` already exists in destination `{}`",
|
||||
name,
|
||||
dst.join(name).to_string_lossy()
|
||||
)
|
||||
})
|
||||
.collect();
|
||||
msg.push("Add --force to overwrite".to_string());
|
||||
bail!("{}", msg.join("\n"));
|
||||
|
@ -694,7 +694,7 @@ fn no_track() {
|
||||
.with_stderr(
|
||||
"\
|
||||
[UPDATING] `[..]` index
|
||||
[ERROR] binary `foo[EXE]` already exists in destination
|
||||
[ERROR] binary `foo[EXE]` already exists in destination `[..]/.cargo/bin/foo`
|
||||
Add --force to overwrite
|
||||
",
|
||||
)
|
||||
|
Loading…
x
Reference in New Issue
Block a user