Skip to content

Commit

Permalink
spawnWindows: Don't search PATH if app path is absolute
Browse files Browse the repository at this point in the history
  • Loading branch information
squeek502 committed Dec 17, 2022
1 parent d324240 commit 9e8ac2b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/std/child_process.zig
Original file line number Diff line number Diff line change
Expand Up @@ -997,6 +997,9 @@ pub const ChildProcess = struct {
}
}

// No need to search the PATH if the app path is absolute
if (fs.path.isAbsoluteWindowsWTF16(app_path_w)) return no_path_err;

// app_path_w has the cwd prepended to it if cwd is non-null, so when
// searching the PATH we should make sure we use the app_name verbatim.
var app_name_w_needs_free = false;
Expand Down

0 comments on commit 9e8ac2b

Please sign in to comment.