refactor: share app id and name via paths crate
This commit is contained in:
@@ -7,14 +7,12 @@ use clap::{Args, Parser, Subcommand};
|
||||
use gpui::{App, AsyncApp, Entity, Subscription};
|
||||
use nostr::nips::nip19::Nip19Coordinate;
|
||||
use nostr::prelude::{PublicKey, RelayUrl, ToBech32 as _};
|
||||
use paths::APP_ID;
|
||||
use settings::{DEFAULT_GRASP_SERVERS, SettingsStore};
|
||||
use signed_core::{Announcement, RepoAddr};
|
||||
use signed_git::{GitCache, Repo};
|
||||
use signed_state::{Backend, BackendEvent, CheckoutsStore};
|
||||
|
||||
/// The desktop app's bundle identifier, the packager `identifier` in `desktop/Cargo.toml`.
|
||||
const DESKTOP_BUNDLE_ID: &str = "info.reya.signed";
|
||||
|
||||
/// Command line interface for Signed.
|
||||
#[derive(Parser)]
|
||||
#[command(name = "si", version, about)]
|
||||
@@ -156,7 +154,7 @@ fn open_desktop() -> anyhow::Result<()> {
|
||||
if cfg!(target_os = "macos") {
|
||||
// Launch Services finds the app by its bundle identifier wherever it is installed.
|
||||
let status = std::process::Command::new("open")
|
||||
.args(["-b", DESKTOP_BUNDLE_ID])
|
||||
.args(["-b", APP_ID])
|
||||
.status()
|
||||
.context("failed to launch the desktop app")?;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user