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