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.
2 parents 189a90d + a886fc2 commit cce8e65Copy full SHA for cce8e65
Foundation/Process.swift
@@ -469,6 +469,12 @@ open class Process: NSObject {
469
environment["PWD"] = currentDirectoryURL.path
470
}
471
472
+ // On Windows, the PATH is required in order to locate dlls needed by
473
+ // the process so we should also pass that to the child
474
+ if environment["Path"] == nil, let path = ProcessInfo.processInfo.environment["Path"] {
475
+ environment["Path"] = path
476
+ }
477
+
478
// NOTE(compnerd) the environment string must be terminated by a double
479
// null-terminator. Otherwise, CreateProcess will fail with
480
// INVALID_PARMETER.
0 commit comments