Skip to content

Commit

Permalink
Default env: to DOTENV_ENV/FOOBARA_ENV/"development"
Browse files Browse the repository at this point in the history
  • Loading branch information
azimux committed Feb 4, 2024
1 parent 4007e92 commit a5d6435
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/load_dotenv.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ def run!(...)

attr_accessor :env, :dir, :env_files, :env_files_to_apply

def initialize(env:, dir: Dir.pwd)
def initialize(env: ENV["DOTENV_ENV"] || ENV["FOOBARA_ENV"] || ENV.fetch("development", nil), dir: Dir.pwd)
unless env
# :nocov:
raise ArgumentError, "env must be provided"
Expand Down

0 comments on commit a5d6435

Please sign in to comment.