mirror of
https://github.com/nim-lang/Nim.git
synced 2026-04-18 21:40:32 +00:00
Let the environment variable NIMBLE_DIR overrides nimblepath in cfg file (#6542)
* Let the environment variable NIMBLE_DIR overrides nimblepath in cfg file If the length of NIMBLE_DIR is larger than zero, the nimblepath will be set to $NIMBLE_DIR/pkgs
This commit is contained in:
@@ -127,7 +127,9 @@ proc resolve(t: Task) =
|
||||
|
||||
when considerNimbleDirs:
|
||||
if not t.noNimblePath:
|
||||
if findInNimbleDir(t, getHomeDir() / ".nimble" / "pkgs"): return
|
||||
var nimbleDir = getEnv("NIMBLE_DIR")
|
||||
if nimbleDir.len == 0: nimbleDir = getHomeDir() / ".nimble"
|
||||
if findInNimbleDir(t, nimbleDir / "pkgs"): return
|
||||
when not defined(windows):
|
||||
if findInNimbleDir(t, "/opt/nimble/pkgs"): return
|
||||
|
||||
|
||||
Reference in New Issue
Block a user