Skip to content

Commit 09ddfe7

Browse files
committed
(defensively) only set RACK_ENV when rack.env present - don't default to ''
1 parent ebe6fdd commit 09ddfe7

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/warbler/templates/rack.erb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1-
ENV['RACK_ENV'] ||= '<%= (params = config.webxml.context_params; params['rack.env']) %>'
1+
<% if params = config.webxml.context_params && params['rack.env'] -%>
2+
ENV['RACK_ENV'] ||= '<%= params['rack.env'] %>'
3+
<% end -%>
24

35
$LOAD_PATH.unshift $servlet_context.getRealPath('/WEB-INF') if $servlet_context

0 commit comments

Comments
 (0)