Fix #269 Set $TMPDIR to a default value, if not set
This commit is contained in:
parent
5bda827143
commit
c528ab1eaa
@ -25,6 +25,12 @@ if !s:has_features
|
|||||||
finish
|
finish
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
" Set the TMPDIR environment variable if it is not set automatically.
|
||||||
|
" This can automatically fix some environments.
|
||||||
|
if has('unix') && empty($TMPDIR)
|
||||||
|
let $TMPDIR = '/tmp'
|
||||||
|
endif
|
||||||
|
|
||||||
" This global variable is used internally by ALE for tracking information for
|
" This global variable is used internally by ALE for tracking information for
|
||||||
" each buffer which linters are being run against.
|
" each buffer which linters are being run against.
|
||||||
let g:ale_buffer_info = {}
|
let g:ale_buffer_info = {}
|
||||||
|
2
test/test_tmpdir_init.vader
Normal file
2
test/test_tmpdir_init.vader
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
Execute($TMPDIR should be set to a default value if unset):
|
||||||
|
AssertEqual '/tmp', $TMPDIR
|
@ -20,3 +20,7 @@ set foldnestmax=10
|
|||||||
set ttimeoutlen=0
|
set ttimeoutlen=0
|
||||||
|
|
||||||
let g:mapleader=','
|
let g:mapleader=','
|
||||||
|
|
||||||
|
" Clear the TMPDIR value for tests.
|
||||||
|
" The plugin should set this to /tmp by default, which we will test.
|
||||||
|
let $TMPDIR = ''
|
||||||
|
Loading…
Reference in New Issue
Block a user