From 87581c5b3586ad3e425c1a6db8e542aaa9377bae Mon Sep 17 00:00:00 2001 From: Federico Terzi Date: Wed, 2 Jun 2021 12:49:59 +0200 Subject: [PATCH] fix(core): release legacy lock file after check --- espanso/src/cli/daemon/mod.rs | 1 + espanso/src/cli/worker/mod.rs | 1 + 2 files changed, 2 insertions(+) diff --git a/espanso/src/cli/daemon/mod.rs b/espanso/src/cli/daemon/mod.rs index 7864d71..5ceac1f 100644 --- a/espanso/src/cli/daemon/mod.rs +++ b/espanso/src/cli/daemon/mod.rs @@ -65,6 +65,7 @@ fn daemon_main(args: CliModuleArgs) -> i32 { error!("an instance of legacy espanso is running, please terminate it, otherwise the new version cannot start"); return DAEMON_LEGACY_ALREADY_RUNNING; } + drop(legacy_lock_file); // TODO: we might need to check preconditions: accessibility on macOS, presence of binaries on Linux, etc diff --git a/espanso/src/cli/worker/mod.rs b/espanso/src/cli/worker/mod.rs index 22855af..8f70311 100644 --- a/espanso/src/cli/worker/mod.rs +++ b/espanso/src/cli/worker/mod.rs @@ -60,6 +60,7 @@ fn worker_main(args: CliModuleArgs) -> i32 { error!("an instance of legacy espanso is running, please terminate it, otherwise the new version cannot start"); return WORKER_LEGACY_ALREADY_RUNNING; } + drop(legacy_lock_file); let config_store = args .config_store