Function dotenvy::from_path_override
source · pub fn from_path_override<P: AsRef<Path>>(path: P) -> Result<()>
Expand description
Loads environment variables from the specified path, overriding existing environment variables.
Where multiple declarations for the same environment variable exist in your .env file, the last one is applied.
If you want the existing environment to take precedence,
or if you want to be able to override environment variables on the command line,
then use from_path
instead.
§Examples
use std::path::Path;
dotenvy::from_path_override(Path::new("path/to/.env"))?;