spawnWindows: Don't search PATH if app path is absolute

This commit is contained in:
Ryan Liptak 2022-12-17 03:34:59 -08:00
parent d3242408d4
commit 9e8ac2b666

View File

@ -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;