dotenv-rs / dotenv

Library to help supply environment variables in testing and development
MIT License
557 stars 85 forks source link

please support override load #77

Open Silentdoer opened 2 years ago

Silentdoer commented 2 years ago

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

LeoniePhiline commented 1 year 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.)