Skip to content

Commit

Permalink
use full path for open command on macOS
Browse files Browse the repository at this point in the history
  • Loading branch information
rhysd authored and Byron committed Feb 13, 2022
1 parent 1d94593 commit 8f7c92a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -272,14 +272,14 @@ mod macos {
use crate::{CommandExt, IntoResult, Result};

pub fn that<T: AsRef<OsStr> + Sized>(path: T) -> Result {
Command::new("open")
Command::new("/usr/bin/open")
.arg(path.as_ref())
.output_stderr()
.into_result()
}

pub fn with<T: AsRef<OsStr> + Sized>(path: T, app: impl Into<String>) -> Result {
Command::new("open")
Command::new("/usr/bin/open")
.arg(path.as_ref())
.arg("-a")
.arg(app.into())
Expand Down

0 comments on commit 8f7c92a

Please sign in to comment.