Open
Description
Problem
When there is a $
in a .env
file, the var doesn't get loaded
Minimum reproducible code
echo 'dollar="Dollar$ign"' > .env
use 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
Assignees
Labels
No labels