class RuboCop::Cop::Chef::Deprecations::ExecutePathProperty
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.
@example
### incorrect execute 'some_cmd' do path '/foo/bar' end ### correct execute 'some_cmd' do environment {path: '/foo/bar'} end
Constants
- MSG
Public Instance Methods
Source
# 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