mirror of
https://github.com/inspec/inspec
synced 2024-11-14 00:47:10 +00:00
12fec238f7
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 | ||
fetchers | ||
inspec | ||
matchers | ||
resources | ||
source_readers | ||
utils | ||
inspec.rb |