From d1dbe26b3398d478ea1a8ba56cc571506c08c0aa Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Mon, 6 May 2013 09:49:23 -0400 Subject: Fix warning when PUSH_REMOTE is not set. Closes: #706917 --- commit.d/99push | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'commit.d/99push') diff --git a/commit.d/99push b/commit.d/99push index 9c1844c..9a5d81e 100755 --- a/commit.d/99push +++ b/commit.d/99push @@ -1,7 +1,8 @@ #!/bin/sh - -if [ "$VCS" = git ] && [ -d .git ] && [ -n "$PUSH_REMOTE" ]; then - git push "$PUSH_REMOTE" master || true -else - echo "PUSH_REMOTE not yet supported for $VCS" >&2 +if [ -n "$PUSH_REMOTE" ]; then + if [ "$VCS" = git ] && [ -d .git ]; then + git push "$PUSH_REMOTE" master || true + else + echo "PUSH_REMOTE not yet supported for $VCS" >&2 + fi fi -- cgit v1.2.3