Skip to content

Commit 7dcb260

Browse files
author
Jon Gjengset
committed
Debug Windows through CI
1 parent 9957ce6 commit 7dcb260

File tree

2 files changed

+10
-6
lines changed

2 files changed

+10
-6
lines changed

src/errors.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ error_chain! {
190190
}
191191
InvalidToolchainPath(p: PathBuf) {
192192
description("invalid toolchain path"),
193-
display("invalid toolchain path: '{}'", p.display())
193+
display("invalid toolchain path: '{}'", p.to_string_lossy())
194194
}
195195
CannotSpecifyPathAndOptions(path: PathBuf) {
196196
description("toolchain options are ignored for path toolchains"),

tests/cli-rustup.rs

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1470,7 +1470,10 @@ fn file_override_path() {
14701470
let toolchain_file = config.current_dir().join("rust-toolchain.toml");
14711471
raw::write_file(
14721472
&toolchain_file,
1473-
&format!("[toolchain]\npath=\"{}\"", toolchain_path.to_str().unwrap()),
1473+
&dbg!(format!(
1474+
"[toolchain]\npath=\"{}\"",
1475+
toolchain_path.to_str().unwrap()
1476+
)),
14741477
)
14751478
.unwrap();
14761479

@@ -1545,7 +1548,7 @@ fn file_override_path_relative() {
15451548
// Find shared prefix so we can determine a relative path
15461549
let mut p1 = dbg!(&toolchain_path).components().peekable();
15471550
let mut p2 = dbg!(&toolchain_file).components().peekable();
1548-
while let (Some(p1p), Some(p2p)) = (p1.peek(), p2.peek()) {
1551+
while let (Some(p1p), Some(p2p)) = (dbg!(p1.peek()), dbg!(p2.peek())) {
15491552
if p1p == p2p {
15501553
let _ = p1.next();
15511554
let _ = p2.next();
@@ -1556,13 +1559,14 @@ fn file_override_path_relative() {
15561559
}
15571560
let mut relative_path = PathBuf::new();
15581561
// NOTE: We skip 1 since we don't need to .. across the .toml file at the end of the path
1559-
for _ in p2.skip(1) {
1562+
for p in p2.skip(1) {
1563+
dbg!(p);
15601564
relative_path.push("..");
15611565
}
15621566
for p in p1 {
1563-
relative_path.push(p);
1567+
relative_path.push(dbg!(p));
15641568
}
1565-
assert!(relative_path.is_relative());
1569+
assert!(dbg!(&relative_path).is_relative());
15661570

15671571
raw::write_file(
15681572
&toolchain_file,

0 commit comments

Comments
 (0)