-
Notifications
You must be signed in to change notification settings - Fork 55
Open
Description
Problem
When there is a $ in a .env file, the var doesn't get loaded
Minimum reproducible code
echo 'dollar="Dollar$ign"' > .envuse std::fs;
fn main() {
let _ = dotenv::from_path(".env");
let dollar = std::env::var("dollar").unwrap_or_default();
println!("Resolved: {}", dollar);
let env_content = fs::read_to_string(".env").unwrap_or_default();
println!("File content: {}", env_content)
}Expected Output
Resolved: Dollar$ign
File content: dollar="Dollar$ign"
Actual Output
Resolved:
File content: dollar="Dollar$ign"
Metadata
Metadata
Assignees
Labels
No labels