From 2d4f1bfdd203075a4357ffceda338a702d1e3e87 Mon Sep 17 00:00:00 2001 From: Jonathan Bernard Date: Mon, 8 May 2017 12:40:24 -0500 Subject: [PATCH] Fix logic bug in `findProject(StrawBossConfig, string)`. --- src/main/nim/strawbosspkg/configuration.nim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/nim/strawbosspkg/configuration.nim b/src/main/nim/strawbosspkg/configuration.nim index f01d5e8..68d9c5e 100644 --- a/src/main/nim/strawbosspkg/configuration.nim +++ b/src/main/nim/strawbosspkg/configuration.nim @@ -70,7 +70,7 @@ proc findProject*(cfg: StrawBossConfig, projectName: string): ProjectDef = let candidates = cfg.projects.filterIt(it.name == projectName) if candidates.len == 0: raise newException(KeyError, "no project named " & projectName) - elif candidates.len > 0: + elif candidates.len > 1: raise newException(KeyError, "multiple projects named " & projectName) else: result = candidates[0]