os.findExe on Windows can deal with quotes
This commit is contained in:
parent
c527969059
commit
d338744d7a
1 changed files with 3 additions and 1 deletions
|
|
@ -567,7 +567,9 @@ when declared(getEnv) or defined(nimscript):
|
|||
var path = string(getEnv("PATH"))
|
||||
for candidate in split(path, PathSep):
|
||||
when defined(windows):
|
||||
var x = candidate / result
|
||||
var x = (if candidate[0] == '"' and candidate[^1] == '"':
|
||||
substr(candidate, 1, candidate.len-2) else: candidate) /
|
||||
result
|
||||
else:
|
||||
var x = expandTilde(candidate) / result
|
||||
if existsFile(x): return x
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue