(file_path: impl AsRef<Path>, env: &EnvMap)
| 648 | } |
| 649 | |
| 650 | fn export_env(file_path: impl AsRef<Path>, env: &EnvMap) -> anyhow::Result<()> { |
| 651 | let env = env |
| 652 | .iter() |
| 653 | .map(|(k, v)| format!("{k}={v}")) |
| 654 | .collect::<Vec<_>>(); |
| 655 | |
| 656 | export_file(file_path, env.join("\n")) |
| 657 | } |
| 658 | |
| 659 | fn read_file(file_path: impl AsRef<Path>) -> anyhow::Result<String> { |
| 660 | fs::read_to_string(&file_path) |
no test coverage detected