feat: install si command from settings
This commit is contained in:
+4
-11
@@ -132,17 +132,8 @@ async fn run(command: Command, cx: &mut AsyncApp) -> anyhow::Result<()> {
|
||||
|
||||
/// Launches the desktop app: the `signed` binary built next to this one, else the installed app.
|
||||
fn open_desktop() -> anyhow::Result<()> {
|
||||
let exe = std::env::current_exe().context("failed to locate this executable")?;
|
||||
let extension = std::env::consts::EXE_EXTENSION;
|
||||
|
||||
let sibling = if extension.is_empty() {
|
||||
exe.with_file_name("signed")
|
||||
} else {
|
||||
exe.with_file_name(format!("signed.{extension}"))
|
||||
};
|
||||
|
||||
if sibling.is_file() {
|
||||
std::process::Command::new(&sibling)
|
||||
if let Some(desktop) = paths::sibling_binary("signed") {
|
||||
std::process::Command::new(desktop)
|
||||
.stdin(Stdio::null())
|
||||
.stdout(Stdio::null())
|
||||
.stderr(Stdio::null())
|
||||
@@ -165,6 +156,8 @@ fn open_desktop() -> anyhow::Result<()> {
|
||||
return Ok(());
|
||||
}
|
||||
|
||||
let exe = std::env::current_exe().context("failed to locate this executable")?;
|
||||
|
||||
bail!(
|
||||
"the desktop app was not found next to {}; run `cargo run -p signed` instead",
|
||||
exe.display()
|
||||
|
||||
Reference in New Issue
Block a user