homebrew

Function brew_spawn

Source
pub fn brew_spawn(cmd: &str) -> Result<()>
Expand description

执行 brew 命令并实时输出信息

默认添加环境变量 HOMEBREW_NO_AUTO_UPDATE=1

如果想要更复杂的构造执行器,请使用 Brew

Examples

extern crate homebrew;

homebrew::brew_spawn("update")?;
HOMEBREW_BREW_GIT_REMOTE set: using https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/brew.git as the Homebrew/brew Git remote.
==> Updating Homebrew...
Already up-to-date.