Skip to main content

TmpPath

All Cookstyle Cops


The department is: Chef/Correctness

The full name of the cop is: Chef/Correctness/TmpPath


Enabled by defaultSupports autocorrectionTarget Chef Version
EnabledNoAll Versions

Use file_cache_path rather than hard-coding tmp paths

Examples

incorrect

remote_file '/tmp/large-file.tar.gz' do

correct

remote_file "#{Chef::Config[:file_cache_path]}/large-file.tar.gz" do

Configurable attributes

NameDefault valueConfigurable values
Version Added5.0.0String
Exclude
  • **/metadata.rb
  • **/Berksfile
Array

Was this page helpful?









Search Results