Overrides the nimbleDir option with value from command line

This commit is contained in:
Clement 2015-05-02 17:33:34 +02:00
commit 59ade34b6a

View file

@ -74,6 +74,7 @@ Options:
-n, --reject Reject all interactive prompts.
--ver Query remote server for package version
information when searching or listing packages
--dir Set the Nimble directory.
For more information read the Github readme:
https://github.com/nim-lang/nimble#readme
@ -217,6 +218,7 @@ proc parseCmdLine(): Options =
of "accept", "y": result.forcePrompts = forcePromptYes
of "reject", "n": result.forcePrompts = forcePromptNo
of "ver": result.queryVersions = true
of "dir": result.config.nimbleDir = val # overrides option from file
of "installed", "i": result.queryInstalled = true
else: discard
of cmdEnd: assert(false) # cannot happen