Created
March 3, 2009 22:01
-
-
Save myabc/73553 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
From 05721dde8a1adfe34f091560a2e2bef54d2fe65e Mon Sep 17 00:00:00 2001 | |
From: Alex Coles <[email protected]> | |
Date: Tue, 3 Mar 2009 22:57:10 +0100 | |
Subject: [PATCH] Ensure rake install command uses same Ruby interpreter/implementation | |
Signed-off-by: Alex Coles <[email protected]> | |
--- | |
tasks/install.rb | 6 +++++- | |
1 files changed, 5 insertions(+), 1 deletions(-) | |
diff --git a/tasks/install.rb b/tasks/install.rb | |
index 24ca864..c16baef 100644 | |
--- a/tasks/install.rb | |
+++ b/tasks/install.rb | |
@@ -1,6 +1,10 @@ | |
WIN32 = (RUBY_PLATFORM =~ /win32|mingw|bccwin|cygwin/) rescue nil | |
SUDO = WIN32 ? '' : ('sudo' unless ENV['SUDOLESS']) | |
+def sudo_gem(cmd) | |
+ sh "#{SUDO} #{RUBY} -S gem #{cmd}", :verbose => false | |
+end | |
+ | |
desc "Install #{GEM_NAME}" | |
if WIN32 | |
task :install => :gem do | |
@@ -15,6 +19,6 @@ if WIN32 | |
end | |
else | |
task :install => :package do | |
- sh %{#{SUDO} gem install --local pkg/#{GEM_NAME}-#{GEM_VERSION}.gem} | |
+ sudo_gem %{install --local pkg/#{GEM_NAME}-#{GEM_VERSION}.gem} | |
end | |
end | |
-- | |
1.6.1.3 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment