summary refs log tree commit diff stats
path: root/compiler/nimblecmd.nim
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/nimblecmd.nim')
-rw-r--r--compiler/nimblecmd.nim2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/nimblecmd.nim b/compiler/nimblecmd.nim
index 9b647e67d..c6c2ab058 100644
--- a/compiler/nimblecmd.nim
+++ b/compiler/nimblecmd.nim
@@ -48,7 +48,7 @@ proc addPackage(packages: StringTableRef, p: string) =
   let name = p.substr(0, x-1)
   if x < p.len:
     let version = p.substr(x+1)
-    if packages[name] <. version:
+    if packages.getOrDefault(name) <. version:
       packages[name] = version
   else:
     packages[name] = latest