diff --git a/lib/tasks/gitlab/info.rake b/lib/tasks/gitlab/info.rake index a13f40272c952145b894b9d76855853ef789b4ff..ccd291aacb4fcebe1ac8ca6a18c49d920f5ad2f6 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