From 2725aefb7161cdbd5536980875752e519fe9848b Mon Sep 17 00:00:00 2001 From: Saurabh Bhatia Date: Fri, 14 Mar 2014 11:14:51 +0800 Subject: [PATCH] Rescued nil when there are no tags --- app/controllers/admin/sites_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/admin/sites_controller.rb b/app/controllers/admin/sites_controller.rb index fa6aa48..f07abac 100644 --- a/app/controllers/admin/sites_controller.rb +++ b/app/controllers/admin/sites_controller.rb @@ -191,7 +191,7 @@ class Admin::SitesController < OrbitBackendController def git_tags @current_tag = %x(git describe --tags).gsub("\n","") - @latest_tag = `git ls-remote --tags origin | awk '{print $2}'`.split(/\n/).last.gsub("refs/tags/","") + @latest_tag = `git ls-remote --tags origin | awk '{print $2}'`.split(/\n/).last.gsub("refs/tags/","") rescue nil end end