Skip to main content

ExecutePathProperty

All Cookstyle Cops


The department is: Chef/Deprecations

The full name of the cop is: Chef/Deprecations/ExecutePathProperty


Enabled by defaultSupports autocorrectionTarget Chef Version
EnabledNoAll Versions

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.

Examples

incorrect

execute 'some_cmd' do
  path '/foo/bar'
end

correct

execute 'some_cmd' do
  environment {path: '/foo/bar'}
end

Configurable attributes

NameDefault valueConfigurable values
Version Added6.17.0String
Exclude
  • **/metadata.rb
  • **/attributes/*.rb
  • **/Berksfile
Array

Was this page helpful?