lib/bundles/inspec-compliance/target.rb in inspec-1.13.0 vs lib/bundles/inspec-compliance/target.rb in inspec-1.14.0
- old
+ new
@@ -35,11 +35,11 @@
msg = 'inspec compliance login_automate https://your_automate_server --user USER --ent ENT --dctoken DCTOKEN or --usertoken USERTOKEN'
else
server = 'compliance'
msg = "inspec compliance login https://your_compliance_server --user admin --insecure --token 'PASTE TOKEN HERE' "
end
- fail Inspec::FetcherFailure, <<EOF
+ raise Inspec::FetcherFailure, <<EOF
Cannot fetch #{uri} because your #{server} token has not been
configured.
Please login using
@@ -49,10 +49,10 @@
end
# verifies that the target e.g base/ssh exists
profile = uri.host + uri.path
if !Compliance::API.exist?(config, profile)
- fail Inspec::FetcherFailure, "The compliance profile #{profile} was not found on the configured compliance server"
+ raise Inspec::FetcherFailure, "The compliance profile #{profile} was not found on the configured compliance server"
end
profile_fetch_url = Compliance::API.target_url(config, profile)
end
# We need to pass the token to the fetcher
config['token'] = Compliance::API.get_token(config)