From 51a34ea88880836dc8bb0c68d2a0d414d4111e42 Mon Sep 17 00:00:00 2001 From: Todd Eichel Date: Thu, 17 Feb 2011 16:19:28 -0500 Subject: [PATCH] Improve compatibility with older git versions. --- src/duostack | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/duostack b/src/duostack index 34f038f..5067d30 100755 --- a/src/duostack +++ b/src/duostack @@ -326,8 +326,8 @@ module Duostack # if --remote is specified, it will use that assuming it's valid # if not, it will look for any remote name that references duostack.net def app_name_from_git_remotes - remotes = `git remote -v 2>&1`.split("\n") - remotes.reject! { |line| line.split.last != '(push)' } # filter non-push remotes + remotes = `git remote -v 2>/dev/null`.split("\n") + remotes.reject! { |line| line.split.last == '(fetch)' } # filter out fetch remotes (careful, does not exist in older git versions) # find url of remote of specified name valid_remotes = remotes.reject do |line|