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

Method open_admin

atomic-cli/src/service/mod.rs:135–145  ·  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

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

Callers

nothing calls this directly

Calls 3

currentFunction · 0.50
refusalFunction · 0.50
openFunction · 0.50

Tested by

no test coverage detected