File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
tests/run-make/windows-binary-no-external-deps Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change 22//! a "hello world" application by setting `PATH` to `C:\Windows\System32`.
33//@ only-windows
44
5- use run_make_support:: { env_var, rustc} ;
5+ use run_make_support:: { cwd , env_var, rustc} ;
66use std:: path:: PathBuf ;
77use std:: process:: Command ;
88
@@ -12,7 +12,7 @@ fn main() {
1212 let windows_dir = env_var ( "SystemRoot" ) ;
1313 let system32: PathBuf = [ & windows_dir, "System32" ] . iter ( ) . collect ( ) ;
1414 // Note: This does not use the support wrappers so that we can precisely control the PATH
15- let exe = "hello.exe" ;
15+ let exe = cwd ( ) . join ( "hello.exe" ) ;
1616 let status = Command :: new ( exe) . env ( "PATH" , & system32) . spawn ( ) . unwrap ( ) . wait ( ) . unwrap ( ) ;
1717 if !status. success ( ) {
1818 panic ! ( "Command failed!\n output status: `{status}`" ) ;
You can’t perform that action at this time.
0 commit comments