Locate the workspace root by walking up from the crate's manifest directory.
()
| 11 | |
| 12 | /// Locate the workspace root by walking up from the crate's manifest directory. |
| 13 | fn workspace_root() -> PathBuf { |
| 14 | let manifest_dir = Path::new(env!("CARGO_MANIFEST_DIR")); |
| 15 | // e2e/rust/ is two levels below the workspace root. |
| 16 | manifest_dir |
| 17 | .ancestors() |
| 18 | .nth(2) |
| 19 | .expect("failed to resolve workspace root from CARGO_MANIFEST_DIR") |
| 20 | .to_path_buf() |
| 21 | } |
| 22 | |
| 23 | /// Return the path to the `openshell` CLI binary. |
| 24 | /// |
no outgoing calls