Skip to content

Commit

Permalink
fix load_dotenv()
Browse files Browse the repository at this point in the history
  • Loading branch information
hhaensel committed Apr 23, 2024
1 parent da328a8 commit a8c64f7
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions src/Loader.jl
Original file line number Diff line number Diff line change
Expand Up @@ -91,12 +91,11 @@ Loads .env file if present
"""
function load_dotenv()
if isfile(Genie.config.env_file)
@static if VersionNumber(Genie.Util.package_version(DotEnv)) >= v"1.0"
DotEnv.load!(Genie.config.env_file; override = true)
else
DotEnv.config(; path = Genie.config.env_file, override = true)
end
DotEnv.load!(Genie.config.env_file; override = true)
@static if VersionNumber(Genie.Util.package_version(DotEnv)) >= v"1.0"
DotEnv.load!(Genie.config.env_file; override = true)
else
DotEnv.config(; path = Genie.config.env_file, override = true)
end
end

nothing
Expand Down

0 comments on commit a8c64f7

Please sign in to comment.