Skip to content

Commit f9ab7f7

Browse files
committed
Only error out if Rails.env differs from options.environment
MSP-10964
1 parent aa2e26f commit f9ab7f7

File tree

1 file changed

+1
-1
lines changed
  • lib/metasploit/framework/parsed_options

1 file changed

+1
-1
lines changed

lib/metasploit/framework/parsed_options/base.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ def configure(application)
5757
#
5858
# @return [void]
5959
def environment!
60-
if defined?(Rails) && Rails.instance_variable_defined?(:@_env)
60+
if defined?(Rails) && Rails.instance_variable_defined?(:@_env) && Rails.env != options.environment
6161
raise "#{self.class}##{__method__} called too late to set RAILS_ENV: Rails.env already memoized"
6262
end
6363

0 commit comments

Comments
 (0)