Exit code changes when license not found and set for inspec

Signed-off-by: Nik08 <nikita.mathur@progress.com>
This commit is contained in:
Nik08 2023-08-18 13:08:33 +05:30
parent 3c5293d836
commit f05e08eb6b

View file

@ -53,7 +53,7 @@ module Inspec
end
rescue ChefLicensing::LicenseKeyFetcher::LicenseKeyNotFetchedError
Inspec::Log.error "#{Inspec::Dist::PRODUCT_NAME} cannot execute without valid licenses."
Inspec::UI.new.exit(:usage_error)
Inspec::UI.new.exit(:license_not_set)
rescue ChefLicensing::Error => e
Inspec::Log.error e.message
Inspec::UI.new.exit(:usage_error)