Skip to content

Commit

Permalink
add --clearNimblePath; fixes nim-lang#12601 (nim-lang#12609)
Browse files Browse the repository at this point in the history
(cherry picked from commit 738c957)
  • Loading branch information
disruptek authored and narimiran committed Nov 20, 2019
1 parent c78cee6 commit 0e1dd54
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 @@ -380,6 +380,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 @@ -544,6 +544,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 @@ -99,6 +99,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 0e1dd54

Please sign in to comment.