mirror of
https://github.com/dense-analysis/ale.git
synced 2026-10-20 04:47:04 +08:00
Only temporarily replace TMPDIR if it's defined to be an empty string
This commit is contained in:
2 files changed
+24
-6
No files matched your search
@@ -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
|
||||
|
||||
|
||||
Reference in new issue
Block a user