From 97f20b927a4c7050e7e5c4dbb10e81357077f646 Mon Sep 17 00:00:00 2001 From: Johannes Schleifenbaum Date: Fri, 7 Dec 2012 14:18:34 +0100 Subject: [PATCH] fix checking for rvm in env:info task --- lib/tasks/gitlab/info.rake | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/lib/tasks/gitlab/info.rake b/lib/tasks/gitlab/info.rake index a13f40272c9..ccd291aacb4 100644 --- a/lib/tasks/gitlab/info.rake +++ b/lib/tasks/gitlab/info.rake @@ -15,11 +15,17 @@ namespace :gitlab do os_name = os_name.gsub(/\n/, '') # check if there is an RVM environment - m, rvm_version = `rvm --version`.match(/rvm ([\d\.]+) /).to_a + if Kernel.system('rvm --version > /dev/null 2>&1') + m, rvm_version = `rvm --version`.match(/rvm ([\d\.]+) /).to_a + end # check Bundler version - m, bunder_version = `bundle --version`.match(/Bundler version ([\d\.]+)/).to_a + if Kernel.system('bundle --version > /dev/null 2>&1') + m, bunder_version = `bundle --version`.match(/Bundler version ([\d\.]+)/).to_a + end # check Bundler version - m, rake_version = `rake --version`.match(/rake, version ([\d\.]+)/).to_a + if Kernel.system('rake --version > /dev/null 2>&1') + m, rake_version = `rake --version`.match(/rake, version ([\d\.]+)/).to_a + end puts "" puts "System information".yellow -- GitLab