Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

fixed upgrade_gems if the gem command asks for a version

  • Loading branch information...
commit 337a546b82a33ec5fa6f1518c04aa0c49a1fc599 1 parent 24f2c55
@pauldowman pauldowman authored
Showing with 12 additions and 1 deletion.
  1. +12 −1 gem/lib/ec2onrails/recipes.rb
View
13 gem/lib/ec2onrails/recipes.rb
@@ -279,7 +279,18 @@
DESC
task :upgrade_gems, :roles => [:web_admin, :db_admin, :app_admin] do
sudo "gem update --system --no-rdoc --no-ri"
- sudo "gem update -y --no-rdoc --no-ri"
+ sudo "gem update -y --no-rdoc --no-ri" do |ch, str, data|
+ ch[:data] ||= ""
+ ch[:data] << data
+ if data =~ />\s*$/
+ puts data
+ choice = Capistrano::CLI.ui.ask("The gem command is asking for a number:")
+ ch.send_data("#{choice}\n")
+ else
+ puts data
+ end
+ end
+
end
desc <<-DESC
Please sign in to comment.
Something went wrong with that request. Please try again.