Fix logic bug in findProject(StrawBossConfig, string)
.
This commit is contained in:
parent
781eeb6a13
commit
2d4f1bfdd2
@ -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]
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user