mirror of
https://github.com/inspec/inspec
synced 2025-02-17 06:28:40 +00:00
When the JSON resource (and those that subclass off of it) were modified to properly throw exceptions in the event of failure, this caused the `params` method to return nil instead of what it used to be, an empty hash. This is fine in the case of a describe block, but it's not okay when used outside of a describe, as it will cause users trying to pluck from the hash to throw a dreaded-and-unhelpful NilClass error. This change pre-populates the params to be an empty hash, and if the read/parse steps fail, it will still be one. Signed-off-by: Adam Leff <adam@leff.co> |
||
---|---|---|
.. | ||
bundles | ||
dependencies | ||
dsl | ||
fetchers | ||
mock | ||
objects | ||
plugins | ||
profiles | ||
resources | ||
source_readers | ||
utils | ||
file_provider_test.rb | ||
runner_test.rb | ||
shell_detector_test.rb |