CHEF-4010 make a clean exit for License list command (#6552)

* make a clean exit for License list command

Signed-off-by: Sathish <sbabu@progress.com>

* exit UI

Signed-off-by: Sathish <sbabu@progress.com>

---------

Signed-off-by: Sathish <sbabu@progress.com>
This commit is contained in:
Sathish Babu 2023-08-10 18:57:44 +05:30 committed by GitHub
parent 19086a0019
commit 5145fbb779
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -7,6 +7,9 @@ module InspecPlugins::License
desc "list", "List licenses (not applicable to local licensing service)"
def list
ChefLicensing.list_license_keys_info
rescue ChefLicensing::Error => e
Inspec::Log.error e.message
Inspec::UI.new.exit(Inspec::UI::EXIT_LICENSE_NOT_SET)
end
desc "add", "Add a new license (not applicable to local licensing service)"