Fixes crash when running nimble path something.
This commit is contained in:
parent
a778b0f860
commit
8da2fe72fa
1 changed files with 3 additions and 1 deletions
|
|
@ -655,8 +655,10 @@ proc listPaths(options: TOptions) =
|
||||||
## but at the end quits with a non zero exit error.
|
## but at the end quits with a non zero exit error.
|
||||||
##
|
##
|
||||||
## On success the proc returns normally.
|
## On success the proc returns normally.
|
||||||
|
assert options.action.typ == ActionPath
|
||||||
|
assert(not options.action.packages.isNil)
|
||||||
var errors = 0
|
var errors = 0
|
||||||
for name in options.action.optionalName:
|
for name, version in options.action.packages.items:
|
||||||
var installed: seq[VersionAndPath] = @[]
|
var installed: seq[VersionAndPath] = @[]
|
||||||
# There may be several, list all available ones and sort by version.
|
# There may be several, list all available ones and sort by version.
|
||||||
for kind, path in walkDir(options.getPkgsDir):
|
for kind, path in walkDir(options.getPkgsDir):
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue