File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Expand file tree Collapse file tree 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 {
334334 searchPaths. append ( AbsolutePath ( String ( decodingCString: buffer, as: UTF16 . self) ) )
335335
336336 // 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+ }
338340
339341 // The Windows directory
340342 GetWindowsDirectoryW ( & buffer, . init( MAX_PATH + 1 ) )
Original file line number Diff line number Diff line change @@ -91,7 +91,7 @@ public func lookupExecutablePath(
9191 guard var value = value, !value. isEmpty else {
9292 return nil
9393 }
94- let isPath = value. contains ( " \\ " )
94+ let isPath = value. contains ( " \\ " ) || value . contains ( " / " )
9595 if !isPath && !value. contains ( " . " ) {
9696 value. append ( executableFileSuffix)
9797 }
You can’t perform that action at this time.
0 commit comments