Allow opening paths from the CLI

Co-Authored-By: Antonio Scandurra <me@as-cii.com>
This commit is contained in:
Max Brunsfeld
2022-04-20 17:27:31 +02:00
committed by Antonio Scandurra
co-authored by Antonio Scandurra
parent 05c44b9414
commit 43763fa2f8
4 changed files with 47 additions and 34 deletions
+4 -2
View File
@@ -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>)> {