add --clearNimblePath; fixes #12601 (#12609)

(cherry picked from commit 738c957e94)
This commit is contained in:
Andy Davidoff
2019-11-06 14:40:22 -05:00
committed by narimiran
parent c78cee697d
commit 0e1dd54fee
3 changed files with 7 additions and 0 deletions

View File

@@ -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)

View File

@@ -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 =