summaryrefslogtreecommitdiff
path: root/autoload
diff options
context:
space:
mode:
authorw0rp <devw0rp@gmail.com>2018-07-16 08:45:55 +0100
committerw0rp <devw0rp@gmail.com>2018-07-16 08:45:55 +0100
commitfcd62342d531bdeacbd41a8dfa6163301f1fdf9b (patch)
tree86f814d4c29b4d6c25a46ff05e1528606270afed /autoload
parent6e1a5d4189eee015202cdfe90ced638c195aab23 (diff)
downloadale-fcd62342d531bdeacbd41a8dfa6163301f1fdf9b.zip
Only temporarily replace TMPDIR if it's defined to be an empty string
Diffstat (limited to 'autoload')
-rw-r--r--autoload/ale/util.vim3
1 files changed, 1 insertions, 2 deletions
diff --git a/autoload/ale/util.vim b/autoload/ale/util.vim
index eb2877b2..fb6dc085 100644
--- a/autoload/ale/util.vim
+++ b/autoload/ale/util.vim
@@ -280,7 +280,7 @@ endfunction
function! ale#util#Tempname() abort
let l:clear_tempdir = 0
- if has('unix') && empty($TMPDIR)
+ if exists('$TMPDIR') && empty($TMPDIR)
let l:clear_tempdir = 1
let $TMPDIR = '/tmp'
endif
@@ -290,7 +290,6 @@ function! ale#util#Tempname() abort
finally
if l:clear_tempdir
let $TMPDIR = ''
- silent! unlet! $TMPDIR
endif
endtry