Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions crates/goose-cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,9 @@ open = "5.3.2"
[target.'cfg(target_os = "windows")'.dependencies]
winapi = { version = "0.3", features = ["wincred"] }

[features]
# disables the update command
disable-update = []

[dev-dependencies]
tempfile = "3"
Expand Down
7 changes: 5 additions & 2 deletions crates/goose-cli/src/commands/update.rs
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
use std::process::Command;

use anyhow::Result;
use std::process::Command;

const DOWNLOAD_SCRIPT_URL: &str =
"https://github.com/block/goose/releases/download/stable/download_cli.sh";

pub fn update(canary: bool, reconfigure: bool) -> Result<()> {
if cfg!(feature = "disable-update") {
anyhow::bail!("This command is disabled");
};

// Get the download script from github
let curl_output = Command::new("curl")
.arg("-fsSL")
Expand Down