Skip to content

Commit

Permalink
Fix windows test
Browse files Browse the repository at this point in the history
  • Loading branch information
Kobzol committed Jun 8, 2024
1 parent 5844b67 commit b10a404
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/run-make/windows-binary-no-external-deps/rmake.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
//! a "hello world" application by setting `PATH` to `C:\Windows\System32`.
//@ only-windows

use run_make_support::{env_var, rustc};
use run_make_support::{cwd, env_var, rustc};
use std::path::PathBuf;
use std::process::Command;

Expand All @@ -12,7 +12,7 @@ fn main() {
let windows_dir = env_var("SystemRoot");
let system32: PathBuf = [&windows_dir, "System32"].iter().collect();
// Note: This does not use the support wrappers so that we can precisely control the PATH
let exe = "hello.exe";
let exe = cwd().join("hello.exe");
let status = Command::new(exe).env("PATH", &system32).spawn().unwrap().wait().unwrap();
if !status.success() {
panic!("Command failed!\noutput status: `{status}`");
Expand Down

0 comments on commit b10a404

Please sign in to comment.