Allow opening paths from the CLI
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
This commit is contained in:
parent
05c44b9414
commit
43763fa2f8
4 changed files with 47 additions and 34 deletions
|
@ -16,5 +16,6 @@ anyhow = "1.0"
|
|||
core-foundation = "0.9"
|
||||
core-services = "0.2"
|
||||
clap = { version = "3.1", features = ["derive"] }
|
||||
dirs = "3.0"
|
||||
ipc-channel = "0.16"
|
||||
serde = { version = "1.0", features = ["derive"] }
|
|
@ -48,8 +48,10 @@ fn main() -> Result<()> {
|
|||
}
|
||||
|
||||
fn locate_app() -> Result<PathBuf> {
|
||||
Ok("/Users/nathan/src/zed/target/debug/bundle/osx/Zed.app".into())
|
||||
// Ok("/Applications/Zed.app".into())
|
||||
Ok(std::env::current_exe()?
|
||||
.parent()
|
||||
.unwrap()
|
||||
.join("bundle/osx/Zed.app"))
|
||||
}
|
||||
|
||||
fn launch_app(app_path: PathBuf) -> Result<(IpcSender<CliRequest>, IpcReceiver<CliResponse>)> {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue