Open Silentdoer opened 2 years ago
You will be able to do that with dotenv::from_filename_override(".env.prod")
once https://github.com/allan2/dotenvy/pull/47 is merged.
(dotenvy
is the maintained fork. dotenv
is unmaintained for several years.)
such as .env have pair:a=1 b=2, and .env.prod have pair: b=3;use dotenv::from_filename(".env"),a is 1,b is 2,then use dotenv::from_filename(".env.prod") again,then a is 1, but b is 3