Automatically call sudo in the install rake task.

This commit is contained in:
Nathan Weizenbaum 2008-04-22 18:47:11 -07:00
parent f1ac876497
commit 1a7ccf06d0
1 changed files with 2 additions and 1 deletions

View File

@ -113,7 +113,8 @@ END
Rake::Task[:package].enhance { File.delete('REVISION') if File.exists?('REVISION') }
task :install => [:package] do
sh %{gem install --no-ri pkg/haml-#{File.read('VERSION').strip}}
sudo = RUBY_PLATFORM =~ /win32/ ? 'sudo' : ''
sh %{#{sudo} gem install --no-ri pkg/haml-#{File.read('VERSION').strip}}
end
task :release => [:package] do