mirror of
https://github.com/inspec/inspec
synced 2024-11-15 01:17:08 +00:00
Fixes lint failure and test failures which was causing as it's enable to modify the Frozen String literal.
Signed-off-by: Vasu1105 <vasundhara.jagdale@chef.io>
This commit is contained in:
parent
0b587a98af
commit
a78164927f
2 changed files with 3 additions and 2 deletions
|
@ -93,7 +93,8 @@ class Inspec::InspecCLI < Inspec::BaseCLI
|
|||
o["log_location"] = $stderr
|
||||
configure_logger(o)
|
||||
|
||||
what = o[:what] || "profile"
|
||||
# using dup to resolve "can't modify frozen String" error.
|
||||
what = o[:what].dup || "profile"
|
||||
what.downcase!
|
||||
raise Inspec::Error.new("Unrecognized option '#{what}' for --what - expected one of profile, readme, or metadata.") unless %w{profile readme metadata}.include?(what)
|
||||
|
||||
|
|
|
@ -747,7 +747,7 @@ module Inspec
|
|||
end
|
||||
|
||||
def readme
|
||||
@source_reader.readme&.values.first
|
||||
@source_reader.readme&.values&.first
|
||||
end
|
||||
|
||||
def metadata_src
|
||||
|
|
Loading…
Reference in a new issue