From 1320efcf90021fe8b60eb27cea046f837b15baa6 Mon Sep 17 00:00:00 2001 From: Grzegorz Adam Hankiewicz Date: Tue, 17 Mar 2015 20:07:20 +0100 Subject: Excludes windows platfrom from $PATH tilde expansion. Refs #2358. --- lib/pure/os.nim | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/pure/os.nim b/lib/pure/os.nim index 63dcde4e3..f53abe81d 100644 --- a/lib/pure/os.nim +++ b/lib/pure/os.nim @@ -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 = "" -- cgit 1.4.1-2-gfad0