Open a session for administering the repository at the ambient path — `atomic sandbox open/renew/close`. Refused inside a remote sandbox (grant administration is local to the serving host).
()
| 131 | /// path — `atomic sandbox open/renew/close`. Refused inside a remote |
| 132 | /// sandbox (grant administration is local to the serving host). |
| 133 | pub fn open_admin() -> CliResult<Service> { |
| 134 | if let Some((root, _)) = crate::remote_sandbox::current() { |
| 135 | return Err(crate::remote_sandbox::refusal( |
| 136 | &root, |
| 137 | "sandbox administration happens on the host that serves the repository", |
| 138 | )); |
| 139 | } |
| 140 | Self::open()?.ok_or_else(|| CliError::RepositoryNotFound { |
| 141 | searched_path: std::env::current_dir().unwrap_or_default(), |
| 142 | }) |
| 143 | } |
| 144 | |
| 145 | /// Open the service session for an explicit repository path (the |
| 146 | /// Reactor's typed dispatch always passes the canonical root). |