Skip to content

Commit 9e8ac2b

Browse files
committed
spawnWindows: Don't search PATH if app path is absolute
1 parent d324240 commit 9e8ac2b

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

lib/std/child_process.zig

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -997,6 +997,9 @@ pub const ChildProcess = struct {
997997
}
998998
}
999999

1000+
// No need to search the PATH if the app path is absolute
1001+
if (fs.path.isAbsoluteWindowsWTF16(app_path_w)) return no_path_err;
1002+
10001003
// app_path_w has the cwd prepended to it if cwd is non-null, so when
10011004
// searching the PATH we should make sure we use the app_name verbatim.
10021005
var app_name_w_needs_free = false;

0 commit comments

Comments
 (0)