From 05fe1bc0c1c9e8fd75ab798ca3ed45f6121852d1 Mon Sep 17 00:00:00 2001 From: Brandon Kiser Date: Sat, 15 Nov 2025 11:08:14 -0800 Subject: [PATCH] fix: remove the update lock after a successful update with macOS --- crates/q_cli/src/cli/internal/mod.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/crates/q_cli/src/cli/internal/mod.rs b/crates/q_cli/src/cli/internal/mod.rs index 24f379af3..548887056 100644 --- a/crates/q_cli/src/cli/internal/mod.rs +++ b/crates/q_cli/src/cli/internal/mod.rs @@ -62,6 +62,7 @@ use fig_proto::util::get_shell; use fig_util::directories::{ figterm_socket_path, logs_dir, + update_lock_path, }; use fig_util::env_var::QTERM_SESSION_ID; use fig_util::{ @@ -253,6 +254,8 @@ pub enum InternalSubcommand { DumpState { component: StateComponent, }, + /// Currently only used by macOS after finishing an update. The old binary calls `FinishUpdate` + /// on the new binary at the end of updating. FinishUpdate { #[arg(long)] relaunch_dashboard: bool, @@ -785,6 +788,8 @@ impl InternalSubcommand { }) .ok(); + let _ = tokio::fs::remove_file(update_lock_path(&fig_os_shim::Context::new())?).await; + Ok(ExitCode::SUCCESS) }, #[cfg(target_os = "macos")]