Permalink
Browse files

no more sudo by default for gem tasks

  • Loading branch information...
saturnflyer committed Jun 25, 2010
1 parent 0dd62d1 commit 657c581466a6546059c95dde74697409ec706a38
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/tasks/release.rake
View
@@ -83,15 +83,15 @@ namespace 'radiant' do
namespace :gem do
desc "Uninstall Gem"
task :uninstall do
- sudo = "sudo " unless RUBY_PLATFORM =~ /mswin|mingw/
+ sudo = "sudo " if ENV['SUDO'] == 'true'
sh "#{sudo}gem uninstall #{PKG_NAME}" rescue nil
end
desc "Build and install Gem from source"
task :install => [:gemspec, :package, :uninstall] do
chdir("#{RADIANT_ROOT}/pkg") do
latest = Dir["#{PKG_NAME}-*.gem"].last
- sudo = "sudo " unless RUBY_PLATFORM =~ /mswin|mingw/
+ sudo = "sudo " if ENV['SUDO'] == 'true'
sh "#{sudo}gem install #{latest}"
end
end

0 comments on commit 657c581

Please sign in to comment.