Provide logger to license-acceptance for help debugging in the future

Signed-off-by: tyler-ball <tball@chef.io>
This commit is contained in:
tyler-ball 2019-04-18 12:29:57 -06:00
parent 50a8fd7370
commit 8425a50872

View file

@ -392,7 +392,11 @@ require 'license_acceptance/acceptor'
begin
if (commands_exempt_from_license_check & ARGV.map(&:downcase)).empty? && # Did they use a non-exempt command?
!ARGV.empty? # Did they supply at least one command?
LicenseAcceptance::Acceptor.check_and_persist('inspec', Inspec::VERSION)
LicenseAcceptance::Acceptor.check_and_persist(
'inspec',
Inspec::VERSION,
logger: Inspec::Log,
)
end
rescue LicenseAcceptance::LicenseNotAcceptedError
Inspec::Log.error 'InSpec cannot execute without accepting the license'