diff options
author | Araq <rumpf_a@web.de> | 2017-01-04 20:53:25 +0100 |
---|---|---|
committer | Araq <rumpf_a@web.de> | 2017-01-06 13:11:17 +0100 |
commit | 842f66db25e38029ae9db38af38310c065aeb06f (patch) | |
tree | 24c0f0d56c71b50b0d34f518b5bead52e6865e8b | |
parent | fb14ec9aae59b029079ee1f2002d7deeb69b6a24 (diff) | |
download | Nim-842f66db25e38029ae9db38af38310c065aeb06f.tar.gz |
compiler API: introduce options.disableNmiblePath
-rw-r--r-- | compiler/commands.nim | 5 | ||||
-rw-r--r-- | compiler/options.nim | 6 |
2 files changed, 7 insertions, 4 deletions
diff --git a/compiler/commands.nim b/compiler/commands.nim index 3daab170c..1ddc85b23 100644 --- a/compiler/commands.nim +++ b/compiler/commands.nim @@ -331,10 +331,7 @@ proc processSwitch(switch, arg: string, pass: TCmdLinePass, info: TLineInfo) = nimblePath(path, info) of "nonimblepath", "nobabelpath": expectNoArg(switch, arg, pass, info) - options.gNoNimblePath = true - options.lazyPaths.head = nil - options.lazyPaths.tail = nil - options.lazyPaths.counter = 0 + disableNimblePath() of "excludepath": expectArg(switch, arg, pass, info) let path = processPath(arg, info) diff --git a/compiler/options.nim b/compiler/options.nim index 50f12d843..e7c9346a7 100644 --- a/compiler/options.nim +++ b/compiler/options.nim @@ -254,6 +254,12 @@ proc removeTrailingDirSep*(path: string): string = else: result = path +proc disableNimblePath*() = + gNoNimblePath = true + lazyPaths.head = nil + lazyPaths.tail = nil + lazyPaths.counter = 0 + include packagehandling proc getNimcacheDir*: string = |