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

Method exec

crates/update/src/cli/install.rs:35–48  ·  view source on GitHub ↗
(self, paths: &SpacetimePaths)

Source from the content-addressed store, hash-verified

33
34impl Install {
35 pub(super) fn exec(self, paths: &SpacetimePaths) -> anyhow::Result<()> {
36 super::tokio_block_on(async {
37 anyhow::ensure!(
38 self.edition == ["standalone"],
39 "can only install spacetimedb-standalone at the moment"
40 );
41 let client = super::reqwest_client()?;
42 let (version, _) = download_and_install(&client, Some(self.version), self.artifact_name, paths).await?;
43 if self.r#use {
44 paths.cli_bin_dir.set_current_version(&version.to_string())?;
45 }
46 Ok(())
47 })?
48 }
49}
50
51pub(super) fn make_progress_bar() -> ProgressBar {

Callers

nothing calls this directly

Calls 6

tokio_block_onFunction · 0.85
reqwest_clientFunction · 0.85
download_and_installFunction · 0.85
set_current_versionMethod · 0.80
OkFunction · 0.50
to_stringMethod · 0.45

Tested by

no test coverage detected