We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7b72fbd commit a886fc2Copy full SHA for a886fc2
Foundation/Process.swift
@@ -445,6 +445,12 @@ open class Process: NSObject {
445
environment["PWD"] = currentDirectoryURL.path
446
}
447
448
+ // On Windows, the PATH is required in order to locate dlls needed by
449
+ // the process so we should also pass that to the child
450
+ if environment["Path"] == nil, let path = ProcessInfo.processInfo.environment["Path"] {
451
+ environment["Path"] = path
452
+ }
453
+
454
// NOTE(compnerd) the environment string must be terminated by a double
455
// null-terminator. Otherwise, CreateProcess will fail with
456
// INVALID_PARMETER.
0 commit comments