Skip to content

Commit b654a1b

Browse files
fix: remove the update lock after a successful update with macOS (#960)
1 parent 3422814 commit b654a1b

File tree

1 file changed

+5
-0
lines changed
  • crates/q_cli/src/cli/internal

1 file changed

+5
-0
lines changed

crates/q_cli/src/cli/internal/mod.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ use fig_proto::util::get_shell;
6262
use fig_util::directories::{
6363
figterm_socket_path,
6464
logs_dir,
65+
update_lock_path,
6566
};
6667
use fig_util::env_var::QTERM_SESSION_ID;
6768
use fig_util::{
@@ -253,6 +254,8 @@ pub enum InternalSubcommand {
253254
DumpState {
254255
component: StateComponent,
255256
},
257+
/// Currently only used by macOS after finishing an update. The old binary calls `FinishUpdate`
258+
/// on the new binary at the end of updating.
256259
FinishUpdate {
257260
#[arg(long)]
258261
relaunch_dashboard: bool,
@@ -785,6 +788,8 @@ impl InternalSubcommand {
785788
})
786789
.ok();
787790

791+
let _ = tokio::fs::remove_file(update_lock_path(&fig_os_shim::Context::new())?).await;
792+
788793
Ok(ExitCode::SUCCESS)
789794
},
790795
#[cfg(target_os = "macos")]

0 commit comments

Comments
 (0)