mirror of
https://github.com/inspec/inspec
synced 2024-11-10 07:04:15 +00:00
enhance: improve fetch and persist to catch entitlement exception (#7121)
Signed-off-by: Sonu Saha <sonu.saha@progress.com>
This commit is contained in:
parent
357e7e8459
commit
ed59ce0369
1 changed files with 3 additions and 0 deletions
|
@ -54,6 +54,9 @@ module Inspec
|
|||
rescue ChefLicensing::LicenseKeyFetcher::LicenseKeyNotFetchedError
|
||||
Inspec::Log.error "#{Inspec::Dist::PRODUCT_NAME} cannot execute without valid licenses."
|
||||
Inspec::UI.new.exit(:license_not_set)
|
||||
rescue ChefLicensing::SoftwareNotEntitled
|
||||
Inspec::Log.error "License is not entitled to use InSpec."
|
||||
Inspec::UI.new.exit(:license_not_entitled)
|
||||
rescue ChefLicensing::Error => e
|
||||
Inspec::Log.error e.message
|
||||
Inspec::UI.new.exit(:usage_error)
|
||||
|
|
Loading…
Reference in a new issue