diff --git a/lib/capistrano/tasks/console.rake b/lib/capistrano/tasks/console.rake index 99e31c12..2f279224 100644 --- a/lib/capistrano/tasks/console.rake +++ b/lib/capistrano/tasks/console.rake @@ -4,7 +4,15 @@ task :console do puts I18n.t('console.welcome', scope: :capistrano, stage: stage) loop do print "#{stage}> " - command = $stdin.gets.chomp + + if input = $stdin.gets + command = input.chomp + else + command = 'exit' + end + + next if command.empty? + if %w{quit exit q}.include? command puts t('console.bye') break