fixes #6939
This commit is contained in:
parent
274fafb2df
commit
4f9ae61695
1 changed files with 10 additions and 5 deletions
|
|
@ -139,10 +139,15 @@ proc findExe*(exe: string, followSymlinks: bool = true;
|
|||
## is added the `ExeExts <#ExeExts>`_ file extensions if it has none.
|
||||
## If the system supports symlinks it also resolves them until it
|
||||
## meets the actual file. This behavior can be disabled if desired.
|
||||
for ext in extensions:
|
||||
result = addFileExt(exe, ext)
|
||||
if existsFile(result): return
|
||||
var path = string(getEnv("PATH"))
|
||||
template checkCurrentDir() =
|
||||
for ext in extensions:
|
||||
result = addFileExt(exe, ext)
|
||||
if existsFile(result): return
|
||||
when defined(posix):
|
||||
if '/' in exe: checkCurrentDir()
|
||||
else:
|
||||
checkCurrentDir()
|
||||
let path = string(getEnv("PATH"))
|
||||
for candidate in split(path, PathSep):
|
||||
when defined(windows):
|
||||
var x = (if candidate[0] == '"' and candidate[^1] == '"':
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue