From 4db8f1cedf34dc0796ca7ad56e47d2c587ece300 Mon Sep 17 00:00:00 2001 From: lancebord Date: Tue, 3 Mar 2026 12:10:39 -0500 Subject: make add checkout tag on tagged update mode --- src/action.rs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/action.rs b/src/action.rs index dba937e..e69d79d 100644 --- a/src/action.rs +++ b/src/action.rs @@ -105,6 +105,15 @@ fn add(url: &str) -> Result<(), String> { repo.path().to_str().unwrap() ); + // if configured for tag mode move the head to the tag before build + let config = Config::new(&config_path).ok_or("config not found".to_string())?; + if let Some(u) = config.update { + if u.as_str() == "tagged" { + util::pull_latest_tag(&clone_path) + .map_err(|e| format!("failed to update repo: {e}"))?; + } + } + if util::yn_prompt("Run build and install commands?") { println!("Building..."); config::run_config_command(&config_path, &clone_path, ConfigCommand::Build)?; -- cgit v1.2.3-59-g8ed1b