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
|
@ -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