summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorAndreas Rumpf <rumpf_a@web.de>2017-05-11 17:00:50 +0200
committerAndreas Rumpf <rumpf_a@web.de>2017-05-11 17:00:50 +0200
commit1a29069ececd4514195a58e1fe68385fa1240d46 (patch)
tree7ff6af936b10151bc860800c61053df95824c15c
parente17770682c671503f575c1498a5fac703f82ab2b (diff)
downloadNim-1a29069ececd4514195a58e1fe68385fa1240d46.tar.gz
attempt to make nimsuggest work with choosenim
-rw-r--r--nimsuggest/nimsuggest.nim2
1 files changed, 2 insertions, 0 deletions
diff --git a/nimsuggest/nimsuggest.nim b/nimsuggest/nimsuggest.nim
index c1adb87a1..93a418dd7 100644
--- a/nimsuggest/nimsuggest.nim
+++ b/nimsuggest/nimsuggest.nim
@@ -595,6 +595,8 @@ proc handleCmdLine(cache: IdentCache; config: ConfigRef) =
       raise newException(IOError,
           "Cannot find Nim standard library: Nim compiler not in PATH")
     gPrefixDir = binaryPath.splitPath().head.parentDir()
+    if not dirExists(gPrefixDir / "lib"): gPrefixDir = ""
+
     #msgs.writelnHook = proc (line: string) = log(line)
     myLog("START " & gProjectFull)