mirror of
https://github.com/neovim/neovim.git
synced 2025-09-06 19:38:20 +00:00
vim-patch:8.2.3109: check for $DISPLAY never fails
Problem: Check for $DISPLAY never fails.
Solution: Use eval().
f6d877975b
Co-authored-by: Bram Moolenaar <Bram@vim.org>
This commit is contained in:
@@ -126,7 +126,7 @@ endfunc
|
|||||||
" Command to Check for an environment variable
|
" Command to Check for an environment variable
|
||||||
command -nargs=1 CheckEnv call CheckEnv(<f-args>)
|
command -nargs=1 CheckEnv call CheckEnv(<f-args>)
|
||||||
func CheckEnv(name)
|
func CheckEnv(name)
|
||||||
if empty('$' .. a:name)
|
if empty(eval('$' .. a:name))
|
||||||
throw 'Skipped: Environment variable ' .. a:name .. ' is not set'
|
throw 'Skipped: Environment variable ' .. a:name .. ' is not set'
|
||||||
endif
|
endif
|
||||||
endfunc
|
endfunc
|
||||||
|
Reference in New Issue
Block a user