Project

General

Profile

« Previous | Next » 

Revision 5c7db2cf

Added by Dominique Quatravaux about 8 years ago

Fixes #14508 - foreman-rake console can take arguments

One can now say e.g.

foreman-rake console -- --sandbox

We need the --, otherwise foreman-rake itself tries to interpret the flags

(cherry picked from commit d395b95185e2ef90a8661dac7d5cb1ea846585fe)

View differences:

lib/tasks/console.rake
task :console => :environment do
flags = (ARGV.drop_while { |s| s != "--" }) || []
flags.shift
# Extra arguments make IRB attempt to open MagicFile('argument')
# on Rails 4 when starting a console.
ARGV = []
require 'rails/commands/console'
Rails::Console.start(Rails.application)
Rails::Console.start(Rails.application, Rails::Console.parse_arguments(flags))
end

Also available in: Unified diff