Allow opening paths from the CLI

Co-Authored-By: Antonio Scandurra <me@as-cii.com>
This commit is contained in:
Max Brunsfeld 2022-04-19 11:32:46 -07:00 committed by Antonio Scandurra
parent 05c44b9414
commit 43763fa2f8
4 changed files with 47 additions and 34 deletions

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>)> {