]> Nutra Git (v2) - gamesguru/git-remote-gcrypt.git/commitdiff
don't echo external command errors unless repo ID is set
authorSean Whitton <spwhitton@spwhitton.name>
Tue, 27 Nov 2018 05:04:51 +0000 (22:04 -0700)
committerSean Whitton <spwhitton@spwhitton.name>
Tue, 27 Nov 2018 05:04:51 +0000 (22:04 -0700)
Otherwise you'll get the error output whenever you push to a new
remote.

Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
git-remote-gcrypt

index c78f28b92e94a3073d1115156c4c8887424d7789..dcdec7517232393dbd4596772a47ace58b322c39 100755 (executable)
@@ -531,12 +531,13 @@ ensure_connected()
        tmp_manifest="$Tempdir/maniF"
        tmp_stderr="$Tempdir/stderr"
        GET "$URL" "$Manifestfile" "$tmp_manifest" 2>| "$tmp_stderr" || {
-               cat >&2 "$tmp_stderr"
-               echo_info "Repository not found: $URL"
                if ! isnull "$Repoid"; then
+                       cat >&2 "$tmp_stderr"
+                       echo_info "Repository not found: $URL"
                        echo_info "..but repository ID is set. Aborting."
                        return 1
                else
+                       echo_info "Repository not found: $URL"
                        return 0
                fi
        }