mirror of
https://github.com/zed-industries/zed.git
synced 2024-12-27 07:32:02 +03:00
Fix segfault in "install:cli" when app is not yet installed (#9427)
Release Notes: - Fixed a panic running `cli: Install` or `cli: Register Zed Scheme` before installing the app.
This commit is contained in:
parent
c2b42e2bab
commit
f1d98dc748
@ -553,6 +553,11 @@ impl Platform for MacPlatform {
|
|||||||
let workspace: id = msg_send![class!(NSWorkspace), sharedWorkspace];
|
let workspace: id = msg_send![class!(NSWorkspace), sharedWorkspace];
|
||||||
let scheme: id = ns_string(scheme);
|
let scheme: id = ns_string(scheme);
|
||||||
let app: id = msg_send![workspace, URLForApplicationWithBundleIdentifier: bundle_id];
|
let app: id = msg_send![workspace, URLForApplicationWithBundleIdentifier: bundle_id];
|
||||||
|
if app == nil {
|
||||||
|
return Task::ready(Err(anyhow!(
|
||||||
|
"Cannot register URL scheme until app is installed"
|
||||||
|
)));
|
||||||
|
}
|
||||||
let done_tx = Cell::new(Some(done_tx));
|
let done_tx = Cell::new(Some(done_tx));
|
||||||
let block = ConcreteBlock::new(move |error: id| {
|
let block = ConcreteBlock::new(move |error: id| {
|
||||||
let result = if error == nil {
|
let result = if error == nil {
|
||||||
|
Loading…
Reference in New Issue
Block a user