Added a check to see if install is running as root - and if so remove the "sudo" from the install command

git-svn-id: https://beef.googlecode.com/svn/trunk@975 b87d56ec-f9c0-11de-8c8a-61c5e9addfc9
This commit is contained in:
scotty.b.brown@gmail.com
2011-05-15 12:35:19 +00:00
parent 47876e2c90
commit a41de931df

View File

@@ -49,7 +49,7 @@ end
# generate install command for missing gems
def install_command
if RUBY_PLATFORM =~ /linux/ or RUBY_PLATFORM =~ /darwin/
if (RUBY_PLATFORM =~ /linux/ or RUBY_PLATFORM =~ /darwin/) and Process.uid != 0
cmd = "sudo gem install"
$gems_missing.each do |current_gem|
cmd = cmd + " #{current_gem}"