From 8da2fe72fa2eb45214860a1856a9caf83dcaba81 Mon Sep 17 00:00:00 2001 From: Grzegorz Adam Hankiewicz Date: Fri, 5 Dec 2014 20:34:01 +0100 Subject: [PATCH] Fixes crash when running `nimble path something`. --- src/nimble.nim | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/nimble.nim b/src/nimble.nim index 5657951..f410fc7 100644 --- a/src/nimble.nim +++ b/src/nimble.nim @@ -655,8 +655,10 @@ proc listPaths(options: TOptions) = ## but at the end quits with a non zero exit error. ## ## On success the proc returns normally. + assert options.action.typ == ActionPath + assert(not options.action.packages.isNil) var errors = 0 - for name in options.action.optionalName: + for name, version in options.action.packages.items: var installed: seq[VersionAndPath] = @[] # There may be several, list all available ones and sort by version. for kind, path in walkDir(options.getPkgsDir):