Skip to content

Commit

Permalink
Return early if SECRET_KEY_BASE_DUMMY is set
Browse files Browse the repository at this point in the history
  • Loading branch information
svanhesteren committed Aug 6, 2024
1 parent 6698013 commit bd83e66
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/eyaml/railtie.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ class ConflictError < StandardError
end

config.before_configuration do
# Allow rails to run without loading the credentials
return if ENV["SECRET_KEY_BASE_DUMMY"] == "1"

if File.exist?(Rails.root.join("config", "master.key"))
raise ConflictError, "A config/master.key has been found. The rails credentials lookup conflicts with eyaml. Please remove rails credentials management by removing the master.key file to keep using eyaml."
end
Expand Down

0 comments on commit bd83e66

Please sign in to comment.