Skip to content
Permalink
Browse files Browse the repository at this point in the history
Use cachedir
  • Loading branch information
basepi committed Mar 25, 2015
1 parent b49d0d4 commit 22d2f7a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion salt/modules/chef.py
Expand Up @@ -29,7 +29,10 @@ def _default_logfile(exe_name):
Retrieve the logfile name
'''
if salt.utils.is_windows():
logfile_tmp = tempfile.NamedTemporaryFile(dir=os.environ['TMP'],
tmp_dir = os.path.join(__opts__['cachedir'], 'tmp')
if not os.path.isdir(tmp_dir):
os.mkdir(tmp_dir)
logfile_tmp = tempfile.NamedTemporaryFile(dir=tmp_dir,
prefix=exe_name,
suffix='.log',
delete=False)
Expand Down

0 comments on commit 22d2f7a

Please sign in to comment.