MCPcopy Create free account
hub / github.com/clockworklabs/SpacetimeDB / exec

Method exec

crates/update/src/cli.rs:30–45  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

28
29impl Args {
30 pub fn exec(self) -> anyhow::Result<ExitCode> {
31 let paths = match &self.root_dir {
32 Some(root_dir) => SpacetimePaths::from_root_dir(root_dir),
33 None => SpacetimePaths::platform_defaults()?,
34 };
35 match self.cmd {
36 Subcommand::Cli { args: mut cli_args } => {
37 if let Some(root_dir) = &self.root_dir {
38 cli_args.insert(0, OsString::from_iter(["--root-dir=".as_ref(), root_dir.as_ref()]));
39 }
40 crate::proxy::run_cli(Some(&paths), None, cli_args)
41 }
42 Subcommand::Version(version) => version.exec(&paths).map(|()| ExitCode::SUCCESS),
43 Subcommand::SelfInstall(self_install) => self_install.exec(),
44 }
45 }
46}
47
48#[derive(clap::Subcommand)]

Callers

nothing calls this directly

Calls 5

run_cliFunction · 0.70
insertMethod · 0.65
execMethod · 0.65
as_refMethod · 0.45
mapMethod · 0.45

Tested by

no test coverage detected