MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / open_admin

Method open_admin

atomic-cli/src/service/mod.rs:133–143  ·  view source on GitHub ↗

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).

()

Source from the content-addressed store, hash-verified

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).

Callers

nothing calls this directly

Calls 3

openFunction · 0.85
currentFunction · 0.50
refusalFunction · 0.50

Tested by

no test coverage detected