Fall back to gpg2
if gpg
is not available
Signed-off-by: James McCoy <vega.james@gmail.com>
This commit is contained in:
parent
bdf632d370
commit
c2ddc05bc2
@ -75,8 +75,9 @@
|
|||||||
" Variables: {{{2
|
" Variables: {{{2
|
||||||
"
|
"
|
||||||
" g:GPGExecutable
|
" g:GPGExecutable
|
||||||
" If set used as gpg executable, otherwise the system chooses what is run
|
" If set used as gpg executable. If unset, defaults to
|
||||||
" when "gpg" is called. Defaults to "gpg --trust-model always".
|
" "gpg --trust-model always" if "gpg" is available, falling back to
|
||||||
|
" "gpg2 --trust-model always" if not.
|
||||||
"
|
"
|
||||||
" g:GPGUseAgent
|
" g:GPGUseAgent
|
||||||
" If set to 0 a possible available gpg-agent won't be used. Defaults to 1.
|
" If set to 0 a possible available gpg-agent won't be used. Defaults to 1.
|
||||||
@ -278,7 +279,11 @@ function s:GPGInit(bufread)
|
|||||||
|
|
||||||
" check what gpg command to use
|
" check what gpg command to use
|
||||||
if (!exists("g:GPGExecutable"))
|
if (!exists("g:GPGExecutable"))
|
||||||
let g:GPGExecutable = "gpg --trust-model always"
|
if executable("gpg")
|
||||||
|
let g:GPGExecutable = "gpg --trust-model always"
|
||||||
|
else
|
||||||
|
let g:GPGExecutable = "gpg2 --trust-model always"
|
||||||
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
" check if gpg-agent is allowed
|
" check if gpg-agent is allowed
|
||||||
|
Loading…
x
Reference in New Issue
Block a user