mirror of
https://github.com/inspec/inspec
synced 2024-11-26 22:50:36 +00:00
Clarify error message when unknown_group_action is invalid
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
This commit is contained in:
parent
6fc5bd8b83
commit
c63f6e28a3
1 changed files with 4 additions and 4 deletions
|
@ -72,11 +72,11 @@ module Inspec
|
|||
end
|
||||
|
||||
def validate_unknown_group_action
|
||||
seen = (@raw_data['unknown_group_action'] || @unknown_group_action).to_sym
|
||||
unless VALID_ACTIONS.include?(seen)
|
||||
raise Inspec::Deprecation::UnrecognizedActionError, "Unrecognized action for unknown groups '#{seen}' - supported actions: #{VALID_ACTIONS.map(&:to_s).join(', ')}"
|
||||
seen_action = (@raw_data['unknown_group_action'] || @unknown_group_action).to_sym
|
||||
unless VALID_ACTIONS.include?(seen_action)
|
||||
raise Inspec::Deprecation::UnrecognizedActionError, "Unrecognized value '#{seen_action}' for field 'unknown_group_action' - supported actions: #{VALID_ACTIONS.map(&:to_s).join(', ')}"
|
||||
end
|
||||
@unknown_group_action = seen
|
||||
@unknown_group_action = seen_action
|
||||
end
|
||||
|
||||
def validate_group_entry(name, opts)
|
||||
|
|
Loading…
Reference in a new issue