Skip to content

Commit

Permalink
Make description field in packages list optional
Browse files Browse the repository at this point in the history
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#127
  • Loading branch information
bobeff committed Sep 28, 2021
1 parent 1820fbc commit a895feb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/nimblepkg/packageinfo.nim
Original file line number Diff line number Diff line change
Expand Up @@ -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.}

Expand Down

0 comments on commit a895feb

Please sign in to comment.