Skip to content

Commit

Permalink
Add error message when the package_sets part in the manifest is not a…
Browse files Browse the repository at this point in the history
…n array
  • Loading branch information
planthaber authored May 22, 2024
1 parent 1c0a06c commit 9700dbd
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/autoproj/local_package_set.rb
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,9 @@ def raw_description_file
manifest_data = Autoproj.in_file(manifest_path, Autoproj::YAML_LOAD_ERROR) do
YAML.load(File.read(manifest_path)) || Hash.new
end
if !manifest_data["package_sets"].is_a?(Array)
raise SyntaxError.new "The package_sets field in your manifest file is not an array, check your YAML syntax"
end
description["imports"] = description["imports"]
.concat(manifest_data["package_sets"] || Array.new)
description["name"] = name
Expand Down

0 comments on commit 9700dbd

Please sign in to comment.