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:
2
install
2
install
@@ -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}"
|
||||
|
||||
Reference in New Issue
Block a user