File tree 2 files changed +4
-2
lines changed
2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -334,7 +334,9 @@ public final class Process: ObjectIdentifierProtocol {
334
334
searchPaths. append ( AbsolutePath ( String ( decodingCString: buffer, as: UTF16 . self) ) )
335
335
336
336
// The 16-bit Windows system directory
337
- searchPaths. append ( AbsolutePath ( " \( ProcessEnv . vars [ " systemdrive " ] ?? " C: " ) \\ System " ) )
337
+ if let systemDrive = ProcessEnv . vars [ " systemdrive " ] {
338
+ searchPaths. append ( AbsolutePath ( " \( systemDrive) ) \\ System " ) )
339
+ }
338
340
339
341
// The Windows directory
340
342
GetWindowsDirectoryW ( & buffer, . init( MAX_PATH + 1 ) )
Original file line number Diff line number Diff line change @@ -91,7 +91,7 @@ public func lookupExecutablePath(
91
91
guard var value = value, !value. isEmpty else {
92
92
return nil
93
93
}
94
- let isPath = value. contains ( " \\ " )
94
+ let isPath = value. contains ( " \\ " ) || value . contains ( " / " )
95
95
if !isPath && !value. contains ( " . " ) {
96
96
value. append ( executableFileSuffix)
97
97
}
You can’t perform that action at this time.
0 commit comments