Skip to content

Commit d735324

Browse files
authored
fix(cli): deadlock regression from tauri-apps#7802 (tauri-apps#7948)
1 parent b597aa5 commit d735324

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

tooling/cli/Cargo.lock

Lines changed: 3 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tooling/cli/src/helpers/config.rs

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -205,8 +205,13 @@ pub fn get(target: Target, merge_config: Option<&str>) -> crate::Result<ConfigHa
205205
}
206206

207207
pub fn reload(merge_config: Option<&str>) -> crate::Result<ConfigHandle> {
208-
if let Some(conf) = &*config_handle().lock().unwrap() {
209-
get_internal(merge_config, true, conf.target)
208+
let target = config_handle()
209+
.lock()
210+
.unwrap()
211+
.as_ref()
212+
.map(|conf| conf.target);
213+
if let Some(target) = target {
214+
get_internal(merge_config, true, target)
210215
} else {
211216
Err(anyhow::anyhow!("config not loaded"))
212217
}

0 commit comments

Comments
 (0)