Sha256: f6c16226336443bea85da28bbfac547f62f9cb5757eead255fcfc778fcc9f97c

Contents?: true

Size: 486 Bytes

Versions: 37

Compression:

Stored size: 486 Bytes

Contents

desc "Execute remote commands"
task :console do
  stage = fetch(:stage)
  puts I18n.t("console.welcome", scope: :capistrano, stage: stage)
  loop do
    print "#{stage}> "

    command = (input = $stdin.gets) ? input.chomp : "exit"

    next if command.empty?

    if %w{quit exit q}.include? command
      puts t("console.bye")
      break
    else
      begin
        on roles :all do
          execute command
        end
      rescue => e
        puts e
      end
    end
  end
end

Version data entries

37 entries across 37 versions & 2 rubygems

Version Path
capistrano-3.19.2 lib/capistrano/tasks/console.rake
capistrano-3.19.1 lib/capistrano/tasks/console.rake
capistrano-3.19.0 lib/capistrano/tasks/console.rake
capistrano-3.18.1 lib/capistrano/tasks/console.rake
honeybadger-5.4.0 vendor/bundle/ruby/3.2.0/gems/capistrano-3.18.0/lib/capistrano/tasks/console.rake
honeybadger-5.3.0 vendor/bundle/ruby/3.2.0/gems/capistrano-3.18.0/lib/capistrano/tasks/console.rake
capistrano-3.18.0 lib/capistrano/tasks/console.rake
capistrano-3.17.3 lib/capistrano/tasks/console.rake
capistrano-3.17.2 lib/capistrano/tasks/console.rake
capistrano-3.17.1 lib/capistrano/tasks/console.rake
capistrano-3.17.0 lib/capistrano/tasks/console.rake
capistrano-3.16.0 lib/capistrano/tasks/console.rake
capistrano-3.15.0 lib/capistrano/tasks/console.rake
capistrano-3.14.1 lib/capistrano/tasks/console.rake
capistrano-3.14.0 lib/capistrano/tasks/console.rake
capistrano-3.13.0 lib/capistrano/tasks/console.rake
capistrano-3.12.1 lib/capistrano/tasks/console.rake
capistrano-3.12.0 lib/capistrano/tasks/console.rake
honeybadger-4.5.3 vendor/bundle/ruby/2.6.0/gems/capistrano-3.11.0/lib/capistrano/tasks/console.rake
capistrano-3.11.2 lib/capistrano/tasks/console.rake