os.nim: revert findExe 'improvement' that breaks our builds
This commit is contained in:
parent
a43eae8e6c
commit
3bc7dbbd97
1 changed files with 1 additions and 6 deletions
|
|
@ -141,12 +141,7 @@ proc findExe*(exe: string, followSymlinks: bool = true;
|
||||||
## meets the actual file. This behavior can be disabled if desired.
|
## meets the actual file. This behavior can be disabled if desired.
|
||||||
for ext in extensions:
|
for ext in extensions:
|
||||||
result = addFileExt(exe, ext)
|
result = addFileExt(exe, ext)
|
||||||
if existsFile(result):
|
if existsFile(result): return
|
||||||
# on Posix ensure we do not yield binaries in the cwd:
|
|
||||||
when defined(posix):
|
|
||||||
if isAbsolute(result): return
|
|
||||||
else:
|
|
||||||
return
|
|
||||||
var path = string(getEnv("PATH"))
|
var path = string(getEnv("PATH"))
|
||||||
for candidate in split(path, PathSep):
|
for candidate in split(path, PathSep):
|
||||||
when defined(windows):
|
when defined(windows):
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue