(path: &Path, contents: &str)
| 51 | } |
| 52 | |
| 53 | fn write_readonly(path: &Path, contents: &str) -> Result<()> { |
| 54 | std::fs::write(path, contents).into_diagnostic()?; |
| 55 | |
| 56 | #[cfg(unix)] |
| 57 | { |
| 58 | use std::os::unix::fs::PermissionsExt as _; |
| 59 | |
| 60 | std::fs::set_permissions(path, std::fs::Permissions::from_mode(0o444)).into_diagnostic()?; |
| 61 | } |
| 62 | Ok(()) |
| 63 | } |
| 64 | |
| 65 | fn install_optional_agents_pointer(root: &Path) -> Option<PathBuf> { |
| 66 | let agents_path = root.join(AGENTS_FILE); |
no outgoing calls
no test coverage detected