Excludes windows platfrom from $PATH tilde expansion. Refs #2358.
This commit is contained in:
parent
79934b9d68
commit
1320efcf90
1 changed files with 4 additions and 1 deletions
|
|
@ -1874,7 +1874,10 @@ proc findExe*(exe: string): string {.tags: [ReadDirEffect, ReadEnvEffect].} =
|
||||||
if existsFile(result): return
|
if existsFile(result): return
|
||||||
var path = string(os.getEnv("PATH"))
|
var path = string(os.getEnv("PATH"))
|
||||||
for candidate in split(path, PathSep):
|
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
|
if existsFile(x): return x
|
||||||
result = ""
|
result = ""
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue