fork of https://github.com/rustwasm/wasm-pack for the needs of NextGraph.org
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
14 lines
481 B
14 lines
481 B
use anyhow::{bail, Result};
|
|
use std::path::PathBuf;
|
|
|
|
/// Get the path to an existing `safaridriver`.
|
|
///
|
|
/// We can't install `safaridriver` if an existing one is not found because
|
|
/// Apple does not provide pre-built binaries. However, `safaridriver` *should*
|
|
/// be present by default.
|
|
pub fn get_safaridriver() -> Result<PathBuf> {
|
|
match which::which("safaridriver") {
|
|
Ok(p) => Ok(p),
|
|
Err(_) => bail!("could not find `safaridriver` on the `$PATH`"),
|
|
}
|
|
}
|
|
|