Skip to content

Commit

Permalink
When generating toitdoc be more robust if a package.yaml is bad. (#2561)
Browse files Browse the repository at this point in the history
  • Loading branch information
floitsch authored Oct 4, 2024
1 parent 3da7ea3 commit ebcebf1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tools/toitdoc/toitdoc.toit
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ toitdoc invocation/cli.Invocation --toitc/string --sdk-path/string? --output/str
print "No package.yaml found at $package-yaml-path."
exit 1
content := yaml.decode (file.read-content package-yaml-path)
if not content.contains "name":
if content is not Map or not content.contains "name":
print "No 'name' field found in package.yaml."
exit 1
pkg-name = kebabify content["name"]
Expand Down

0 comments on commit ebcebf1

Please sign in to comment.