Skip to main content

Chef/Deprecations/ExecuteRelativeCreatesWithoutCwd

Cookstyle cops page

The Cookstyle cops department: Chef/Deprecations

Enabled by defaultSupports autocorrectionTarget Chef Version
EnabledNoAll Versions

In Chef Infra Client 13 and later you must either specific an absolute path when using the execute resource’s creates property or also use the cwd property.

Examples

incorrect

execute 'some_cmd' do
  creates 'something'
end

correct

execute 'some_cmd' do
  creates '/tmp/something'
end

execute 'some_cmd' do
  creates 'something'
  cwd '/tmp/'
end

Configurable attributes

NameDefault valueConfigurable values
Version Added6.17.0String
Include
    Array

    Thank you for your feedback!

    ×