We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5844b67 commit b10a404Copy full SHA for b10a404
tests/run-make/windows-binary-no-external-deps/rmake.rs
@@ -2,7 +2,7 @@
2
//! a "hello world" application by setting `PATH` to `C:\Windows\System32`.
3
//@ only-windows
4
5
-use run_make_support::{env_var, rustc};
+use run_make_support::{cwd, env_var, rustc};
6
use std::path::PathBuf;
7
use std::process::Command;
8
@@ -12,7 +12,7 @@ fn main() {
12
let windows_dir = env_var("SystemRoot");
13
let system32: PathBuf = [&windows_dir, "System32"].iter().collect();
14
// Note: This does not use the support wrappers so that we can precisely control the PATH
15
- let exe = "hello.exe";
+ let exe = cwd().join("hello.exe");
16
let status = Command::new(exe).env("PATH", &system32).spawn().unwrap().wait().unwrap();
17
if !status.success() {
18
panic!("Command failed!\noutput status: `{status}`");
0 commit comments