Merge pull request #6611 from inspec/nm/exit-code-change-on-no-license

Exit code changes when chef license key not found and set for inspec
This commit is contained in:
Clinton Wolfe 2023-08-22 10:31:54 -04:00 committed by GitHub
commit c948e30de5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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)