Skip to content
This repository was archived by the owner on Apr 5, 2024. It is now read-only.

Commit 96c1a21

Browse files
committed
Auto merge of #193 - Swatinem:windows-tests, r=JohnTitor
Use remove_file instead of shelling out to `rm` Shelling out to `rm` will not work on Windows.
2 parents bb54e22 + 30e7ec8 commit 96c1a21

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

tests/examples.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -165,10 +165,9 @@ mod features {
165165
"rust-semverver returned an unexpected exit status"
166166
);
167167

168-
Command::new("rm")
169-
.args(&[&old_rlib, &new_rlib])
170-
.status()
171-
.expect("could not run rm");
168+
let rm_old = std::fs::remove_file(old_rlib);
169+
let rm_new = std::fs::remove_file(new_rlib);
170+
rm_old.and(rm_new).expect("could not remove rlib files");
172171
}
173172

174173
macro_rules! test {

0 commit comments

Comments
 (0)