commit: 47b6900c425614d4ba22223c13a23920f0618d9f Author: Freed-Wu <Wuzy01 <AT> qq <DOT> com> AuthorDate: Fri Jun 5 00:12:56 2020 +0000 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> CommitDate: Fri Jun 5 05:28:30 2020 +0000 URL: https://gitweb.gentoo.org/proj/gentoo-syntax.git/commit/?id=47b6900c
Fix error when executable('git') == 1 Closes: https://github.com/gentoo/gentoo-syntax/pull/30 Signed-off-by: Michał Górny <mgorny <AT> gentoo.org> plugin/gentoo-common.vim | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugin/gentoo-common.vim b/plugin/gentoo-common.vim index a0fe9cc..a15636a 100644 --- a/plugin/gentoo-common.vim +++ b/plugin/gentoo-common.vim @@ -13,8 +13,8 @@ let g:loaded_gentoo_common=1 fun! GentooGetUser() let l:result = expand("\$ECHANGELOG_USER") if l:result ==# "\$ECHANGELOG_USER" - let l:email = system('git config --global user.email') - let l:name = system('git config --global user.name') + let l:email = executable('git') ? system('git config --global user.email') : expand('$HOST') + let l:name = executable('git') ? system('git config --global user.name') : expand('$USER') let l:result = l:name . ' <' . l:email . '>' endif return l:result