Skip to content

Commit c569559

Browse files
committed
Don't normalize commands
Since commands are looked up in PATH, their `Path` is unreliable and cannot be treated as a normal directory.
1 parent de7e3e7 commit c569559

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

src/cmd/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -381,7 +381,7 @@ impl<'w, 'pl> Command<'w, 'pl> {
381381
),
382382
Binary::__NonExaustive => panic!("do not create __NonExaustive variants manually"),
383383
};
384-
let mut cmd = AsyncCommand::new(crate::utils::normalize_path(&binary));
384+
let mut cmd = AsyncCommand::new(&binary);
385385

386386
cmd.args(&self.args);
387387

tests/buildtest/inside_docker.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@ static CONTAINER_PREFIX: &str = "/outside";
1212
#[test]
1313
#[cfg(unix)]
1414
fn test_hello_world() {
15+
// regression test for https://github.com/rust-lang/rustwide/issues/30
16+
if !Path::new("docker").exists() {
17+
std::fs::create_dir("docker").unwrap();
18+
}
1519
execute("buildtest::test_hello_world").unwrap();
1620
}
1721

0 commit comments

Comments
 (0)