mirror of
https://github.com/inspec/inspec
synced 2024-11-23 05:03:07 +00:00
Provide logger to license-acceptance for help debugging in the future (#3958)
Provide logger to license-acceptance for help debugging in the future
This commit is contained in:
commit
db129be2b2
2 changed files with 6 additions and 2 deletions
|
@ -31,7 +31,7 @@ Gem::Specification.new do |spec|
|
||||||
spec.add_dependency 'train-aws', '~> 0.1'
|
spec.add_dependency 'train-aws', '~> 0.1'
|
||||||
|
|
||||||
# Implementation dependencies
|
# Implementation dependencies
|
||||||
spec.add_dependency 'license-acceptance', '~> 0.2'
|
spec.add_dependency 'license-acceptance', '>= 0.2.13', '< 2.0'
|
||||||
spec.add_dependency 'thor', '~> 0.20'
|
spec.add_dependency 'thor', '~> 0.20'
|
||||||
spec.add_dependency 'json', '>= 1.8', '< 3.0'
|
spec.add_dependency 'json', '>= 1.8', '< 3.0'
|
||||||
spec.add_dependency 'method_source', '~> 0.8'
|
spec.add_dependency 'method_source', '~> 0.8'
|
||||||
|
|
|
@ -392,7 +392,11 @@ require 'license_acceptance/acceptor'
|
||||||
begin
|
begin
|
||||||
if (commands_exempt_from_license_check & ARGV.map(&:downcase)).empty? && # Did they use a non-exempt command?
|
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?
|
!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
|
end
|
||||||
rescue LicenseAcceptance::LicenseNotAcceptedError
|
rescue LicenseAcceptance::LicenseNotAcceptedError
|
||||||
Inspec::Log.error 'InSpec cannot execute without accepting the license'
|
Inspec::Log.error 'InSpec cannot execute without accepting the license'
|
||||||
|
|
Loading…
Reference in a new issue