Class: RuboCop::Cop::Chef::Deprecations::ExecutePathProperty
- Includes:
- RuboCop::Chef::CookbookHelpers
- Defined in:
- lib/rubocop/cop/chef/deprecation/execute_path_property.rb
Overview
In Chef Infra Client 13 and later you must set path env vars in execute resources using the ‘environment` property not the legacy `path` property.
Constant Summary collapse
- MSG =
'In Chef Infra Client 13 and later you must set path env vars in execute resources using the `environment` property not the legacy `path` property.'
Instance Method Summary collapse
Methods included from RuboCop::Chef::CookbookHelpers
#match_property_in_resource?, #match_resource_type?, #method_arg_ast_to_string, #resource_block_name_if_string
Methods inherited from Base
Instance Method Details
#on_block(node) ⇒ Object
41 42 43 44 45 |
# File 'lib/rubocop/cop/chef/deprecation/execute_path_property.rb', line 41 def on_block(node) match_property_in_resource?(:execute, 'path', node) do |offense| add_offense(offense, severity: :warning) # @todo: we could probably autocorrect this with some work end end |