Skip to content

Commit

Permalink
fix: eol in env
Browse files Browse the repository at this point in the history
  • Loading branch information
steveiliop56 committed Nov 19, 2024
1 parent 32ddd84 commit 8b2424e
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/utils/env.rs
Original file line number Diff line number Diff line change
Expand Up @@ -167,11 +167,13 @@ pub fn generate_env_file(custom_env_file_path: Option<PathBuf>) -> Result<(), Er
merged_env_map.insert(key.clone(), value);
}

let merged_env_string = env_map_to_string(&merged_env_map);
let mut merged_env_string = env_map_to_string(&merged_env_map);
merged_env_string.push('\n'); // Add an EOL to the string

std::fs::write(&env_file_path, merged_env_string)?;
} else {
let new_env_string = env_map_to_string(&new_env_map);
let mut new_env_string = env_map_to_string(&new_env_map);
new_env_string.push('\n'); // Add an EOL to the string

std::fs::write(&env_file_path, new_env_string)?;
}
Expand Down

0 comments on commit 8b2424e

Please sign in to comment.