Skip to content

Commit

Permalink
add --clearNimblePath; fixes nim-lang#12601
Browse files Browse the repository at this point in the history
  • Loading branch information
disruptek committed Nov 6, 2019
1 parent 5ccbf7e commit ad4d111
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 0 deletions.
3 changes: 3 additions & 0 deletions compiler/commands.nim
Expand Up @@ -381,6 +381,9 @@ proc processSwitch*(switch, arg: string, pass: TCmdLinePass, info: TLineInfo;
of "nonimblepath", "nobabelpath":
expectNoArg(conf, switch, arg, pass, info)
disableNimblePath(conf)
of "clearnimblepath":
expectNoArg(conf, switch, arg, pass, info)
clearNimblePath(conf)
of "excludepath":
expectArg(conf, switch, arg, pass, info)
let path = processPath(conf, arg, info)
Expand Down
3 changes: 3 additions & 0 deletions compiler/options.nim
Expand Up @@ -546,6 +546,9 @@ proc disableNimblePath*(conf: ConfigRef) =
incl conf.globalOptions, optNoNimblePath
conf.lazyPaths.setLen(0)

proc clearNimblePath*(conf: ConfigRef) =
conf.lazyPaths.setLen(0)

include packagehandling

proc getOsCacheDir(): string =
Expand Down
1 change: 1 addition & 0 deletions doc/advopt.txt
Expand Up @@ -102,6 +102,7 @@ Advanced options:
--putenv:key=value set an environment variable
--NimblePath:PATH add a path for Nimble support
--noNimblePath deactivate the Nimble path
--clearNimblePath empty the list of Nimble package search paths
--noCppExceptions use default exception handling with C++ backend
--cppCompileToNamespace:namespace
use the provided namespace for the generated C++ code,
Expand Down

0 comments on commit ad4d111

Please sign in to comment.