diff options
author | Guillermo Iguaran <guilleiguaran@gmail.com> | 2019-03-24 16:22:21 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-03-24 16:22:21 -0500 |
commit | b4ca05ea43b1033c3f65d23d3b7b624e0e293a35 (patch) | |
tree | 6a254229b7231dac2aa2d5f7392f2a2c64b1ba15 /railties/lib/rails/commands/console/console_command.rb | |
parent | 4ec486145290efb4059b64e84a2bfd9e157bf787 (diff) | |
parent | b27105252bce6a69f6d57c05d4ea28d20e84f8ae (diff) | |
download | rails-b4ca05ea43b1033c3f65d23d3b7b624e0e293a35.tar.gz rails-b4ca05ea43b1033c3f65d23d3b7b624e0e293a35.tar.bz2 rails-b4ca05ea43b1033c3f65d23d3b7b624e0e293a35.zip |
Merge pull request #35723 from sikachu/disable-sandbox-flag
Add config.disable_sandbox option to Rails console
Diffstat (limited to 'railties/lib/rails/commands/console/console_command.rb')
-rw-r--r-- | railties/lib/rails/commands/console/console_command.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/railties/lib/rails/commands/console/console_command.rb b/railties/lib/rails/commands/console/console_command.rb index e35faa5b01..7a9eaefea1 100644 --- a/railties/lib/rails/commands/console/console_command.rb +++ b/railties/lib/rails/commands/console/console_command.rb @@ -26,6 +26,12 @@ module Rails @options = options app.sandbox = sandbox? + + if sandbox? && app.config.disable_sandbox + puts "Error: Unable to start console in sandbox mode as sandbox mode is disabled (config.disable_sandbox is true)." + exit 1 + end + app.load_console @console = app.config.console || IRB |