mirror of
https://github.com/nim-lang/Nim.git
synced 2026-04-20 06:20:38 +00:00
Excludes windows platfrom from $PATH tilde expansion. Refs #2358.
This commit is contained in:
@@ -1874,7 +1874,10 @@ proc findExe*(exe: string): string {.tags: [ReadDirEffect, ReadEnvEffect].} =
|
||||
if existsFile(result): return
|
||||
var path = string(os.getEnv("PATH"))
|
||||
for candidate in split(path, PathSep):
|
||||
var x = expandTilde(candidate) / result
|
||||
when defined(windows):
|
||||
var x = candidate / result
|
||||
else:
|
||||
var x = expandTilde(candidate) / result
|
||||
if existsFile(x): return x
|
||||
result = ""
|
||||
|
||||
|
||||
Reference in New Issue
Block a user