]> Nutra Git (v1) - gamesguru/git-remote-gcrypt.git/commitdiff
pass gcrypt.gpg-args most robustly
authorSean Whitton <spwhitton@spwhitton.name>
Mon, 4 Jul 2016 09:30:51 +0000 (18:30 +0900)
committerSean Whitton <spwhitton@spwhitton.name>
Mon, 4 Jul 2016 09:30:51 +0000 (18:30 +0900)
git-remote-gcrypt

index c9c4102c00ef59d0ca16f98e89352ad58e2283cc..667ab44dee8af28f6bfc7cb9c85009db9e45f642 100755 (executable)
@@ -368,13 +368,16 @@ gpg_hash()
 
 rungpg()
 {
+       if isnonnull "$Conf_gpg_args"; then
+               set -- "$Conf_gpg_args" "$@"
+       fi
        # gpg will fail to run when there is no controlling tty,
        # due to trying to print messages to it, even if a gpg agent is set
        # up. --no-tty fixes this.
        if [ "x$GPG_AGENT_INFO" != "x" ]; then
-               ${GPG} --no-tty "${Conf_gpg_args:-}" "$@"
+               ${GPG} --no-tty "$@"
        else
-               ${GPG} "${Conf_gpg_args:-}" "$@"
+               ${GPG} "$@"
        fi
 }