From a41de931dfe66e7a4f273b96c4d9f9f4b07ea02c Mon Sep 17 00:00:00 2001 From: "scotty.b.brown@gmail.com" Date: Sun, 15 May 2011 12:35:19 +0000 Subject: [PATCH] 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 --- install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install b/install index 6debac87e..1cea40c30 100644 --- a/install +++ b/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}"