use std::ffi::OsString;
use std::path::PathBuf;
use std::process::Command;
pub(super) const DEFAULT_BUNDLE_ID: &str = "com.mitchfultz.ralph";
pub(super) const DEFAULT_APP_NAME: &str = "RalphMac.app";
pub(super) const GUI_CLI_BIN_ENV: &str = "RALPH_BIN_PATH";
#[derive(Debug, Clone, PartialEq, Eq)]
pub(super) struct OpenCommandSpec {
pub(super) program: OsString,
pub(super) args: Vec<OsString>,
}
#[derive(Debug, Clone, PartialEq, Eq)]
pub(super) enum LaunchTarget {
AppPath(PathBuf),
BundleId(String),
}
impl OpenCommandSpec {
pub(super) fn to_command(&self) -> Command {
let mut cmd = Command::new(&self.program);
cmd.args(&self.args);
cmd
}
}