(name: &str)
| 68 | } |
| 69 | |
| 70 | pub fn have_executable(name: &str) -> Result<bool> { |
| 71 | let Some(path) = std::env::var_os("PATH") else { |
| 72 | return Ok(false); |
| 73 | }; |
| 74 | for mut elt in std::env::split_paths(&path) { |
| 75 | elt.push(name); |
| 76 | if elt.try_exists()? { |
| 77 | return Ok(true); |
| 78 | } |
| 79 | } |
| 80 | Ok(false) |
| 81 | } |
| 82 | |
| 83 | /// Given a target directory, if it's a read-only mount, then remount it writable |
| 84 | #[context("Opening {target} with writable mount")] |
no outgoing calls
no test coverage detected