Skip to content

Commit e72d2fa

Browse files
author
Jon Gjengset
committed
Canonicalize another path for display
1 parent d704b65 commit e72d2fa

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

src/notifications.rs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,8 +143,14 @@ impl<'a> Display for Notification<'a> {
143143
} => write!(
144144
f,
145145
"both `{0}` and `{1}` exist. Using `{0}`",
146-
rust_toolchain.display(),
147-
rust_toolchain_toml.display()
146+
rust_toolchain
147+
.canonicalize()
148+
.unwrap_or_else(|_| PathBuf::from(rust_toolchain))
149+
.display(),
150+
rust_toolchain_toml
151+
.canonicalize()
152+
.unwrap_or_else(|_| PathBuf::from(rust_toolchain_toml))
153+
.display(),
148154
),
149155
}
150156
}

0 commit comments

Comments
 (0)