Skip to content

Commit 72c76a6

Browse files
ihabadhamclaude
andcommitted
Use DEFAULT_ENV in fallback_env_warning for consistency with current
The warning message used "(unknown)" when no env vars were set, but current resolves to DEFAULT_ENV in that case. Align so the warning accurately reports what env was attempted. Co-Authored-By: Claude Opus 4.6 <[email protected]>
1 parent 6d421b3 commit 72c76a6

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

lib/shakapacker/env.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ def fallback_env_warning
3030
env_value = if defined?(Rails) && Rails.respond_to?(:env)
3131
Rails.env
3232
else
33-
ENV["RAILS_ENV"].presence || ENV["RACK_ENV"].presence || "(unknown)"
33+
ENV["RAILS_ENV"].presence || ENV["RACK_ENV"].presence || Shakapacker::DEFAULT_ENV
3434
end
3535
logger.info "RAILS_ENV=#{env_value} environment is not defined in #{config_path}, falling back to #{FALLBACK_ENV} environment"
3636
rescue NameError, NoMethodError

0 commit comments

Comments
 (0)