fwd/vendor/open/src/haiku.rs
John Doty 9c435dc440 Vendor dependencies
Let's see how I like this workflow.
2022-12-19 08:38:22 -08:00

17 lines
456 B
Rust

use std::{ffi::OsStr, io, process::Command};
use crate::{CommandExt, IntoResult};
pub fn that<T: AsRef<OsStr>>(path: T) -> io::Result<()> {
Command::new("/bin/open")
.arg(path.as_ref())
.status_without_output()
.into_result()
}
pub fn with<T: AsRef<OsStr>>(path: T, app: impl Into<String>) -> io::Result<()> {
Command::new(app.into())
.arg(path.as_ref())
.status_without_output()
.into_result()
}