From 8f6fefb9abdb779fc0833be5c47073fa0bbe3813 Mon Sep 17 00:00:00 2001 From: Louise Crow Date: Thu, 30 Aug 2012 15:24:27 +0100 Subject: The exit-code flag to git ls-remote seems relatively recent. Check for a non-empty output from the tag query instead. --- lib/tasks/themes.rake | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lib/tasks/themes.rake') diff --git a/lib/tasks/themes.rake b/lib/tasks/themes.rake index 3fb9eef19..40cf56179 100644 --- a/lib/tasks/themes.rake +++ b/lib/tasks/themes.rake @@ -19,9 +19,9 @@ namespace :themes do base_cmd = "git pull --depth 1 #{uri}" # Is there a tag for this version of Alaveteli? usage_tag = "use-with-alaveteli-#{ALAVETELI_VERSION}" - # Query the remote repository passing flags for tags and - # a non-zero return code on failure to find the tag - if system("git ls-remote --exit-code --tags #{uri} #{usage_tag}") + # Query the remote repository passing flags for tags + version_tag = `git ls-remote --tags #{uri} #{usage_tag}` + if !version_tag.blank? # If we got a tag, pull that instead of HEAD puts "Using tag #{usage_tag}" if verbose base_cmd += " refs/tags/#{usage_tag}" -- cgit v1.2.3