From a895feb9d1136e62be727fcc6b09279927c14568 Mon Sep 17 00:00:00 2001 From: Ivan Bobev Date: Tue, 28 Sep 2021 16:09:52 +0300 Subject: [PATCH] Make description field in packages list optional In the Nimble packages list exists a package without description field which causes the tests to fail while executing the "list" command. In order to resolve the problem make the description field optional. Related to nim-lang/nimble#127 --- src/nimblepkg/packageinfo.nim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/nimblepkg/packageinfo.nim b/src/nimblepkg/packageinfo.nim index ca30441d..e734b07b 100644 --- a/src/nimblepkg/packageinfo.nim +++ b/src/nimblepkg/packageinfo.nim @@ -95,7 +95,7 @@ proc fromJson(obj: JSonNode): Package = result.tags = @[] for t in obj["tags"]: result.tags.add(t.str) - result.description = obj.requiredField("description") + result.description = obj.optionalField("description") result.web = obj.optionalField("web") {.warning[ProveInit]: on.}