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 default Supports autocorrection Target Chef Version
Enabled No All Versions

Use file_cache_path rather than hard-coding system temp 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

Name Default value Configurable values
Version Added 5.0.0 String
Exclude
  • **/metadata.rb
  • **/Berksfile
Array

Was this page helpful?

×









Search Results