Allow RAILS_ENV to override default environment of 'production'
MSP-10964bug/bundler_fix
parent
38c6e2d3e0
commit
aa2e26f8f2
|
@ -85,14 +85,16 @@ class Metasploit::Framework::ParsedOptions::Base
|
|||
options.database.disable = false
|
||||
options.database.migrations_paths = []
|
||||
|
||||
# If RAILS_ENV is set, then it will be used, but if RAILS_ENV is set and the --environment option is given, then
|
||||
# --environment value will be used to reset ENV[RAILS_ENV].
|
||||
options.environment = ENV['RAILS_ENV'] || DEFAULT_ENVIRONMENT
|
||||
|
||||
options.framework = ActiveSupport::OrderedOptions.new
|
||||
options.framework.config = nil
|
||||
|
||||
options.modules = ActiveSupport::OrderedOptions.new
|
||||
options.modules.path = nil
|
||||
|
||||
options.environment = DEFAULT_ENVIRONMENT
|
||||
|
||||
@options = options
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue