Merge pull request #4650 from inspec/cw/fix-compliance-exec

Fix config reference in `compliance exec`
This commit is contained in:
Miah Johnson 2019-10-31 14:18:47 -07:00 committed by GitHub
commit 7442955ed6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -72,10 +72,10 @@ module InspecPlugins
desc "exec PROFILE", "executes a #{COMPLIANCE_PRODUCT_NAME} profile"
exec_options
def exec(*tests)
config = InspecPlugins::Compliance::Configuration.new
return unless loggedin(config)
compliance_config = InspecPlugins::Compliance::Configuration.new
return unless loggedin(compliance_config)
o = opts(:exec).dup
o = config # o is an Inspec::Config object, provided by a helper method from Inspec::BaseCLI
diagnose(o)
configure_logger(o)