(&self, env_vars: &BTreeMap<String, String>)
| 1457 | } |
| 1458 | |
| 1459 | fn write_env_file(&self, env_vars: &BTreeMap<String, String>) -> Result<()> { |
| 1460 | info!("Writing env"); |
| 1461 | fs::write( |
| 1462 | self.shared.dir.join(DECRYPTED_ENV), |
| 1463 | crate::parse_env_file::convert_env_to_str(env_vars), |
| 1464 | ) |
| 1465 | .context("Failed to write decrypted env file")?; |
| 1466 | let env_json = fs::File::create(self.shared.dir.join(DECRYPTED_ENV_JSON)) |
| 1467 | .context("Failed to create env file")?; |
| 1468 | serde_json::to_writer(env_json, &env_vars).context("Failed to write decrypted env file")?; |
| 1469 | Ok(()) |
| 1470 | } |
| 1471 | |
| 1472 | fn unseal_env_vars(&self) -> Result<BTreeMap<String, String>> { |
| 1473 | let allowed_envs: BTreeSet<String> = self |
no test coverage detected