在 mac 下使用 brew 安装包的时候,最后一行会报错:
fatal: not in a git directory
Error: Command failed with exit 128: git
导致包安装不成功,解决办法:
brew -v
绿色框就是提示你需要做的,输入
git config --global --add safe.directory /opt/homebrew/Library/Taps/homebrew/homebrew-core
git config --global --add safe.directory /opt/homebrew/Library/Taps/homebrew/homebrew-cask
再次使用 brew install xxx 安装包,可以安装成功啦!
- directory git Command failed Errordirectory git command failed command项目failed error git directory homebrew command 前端command failed error phasescriptexecution command nonzero failed directory fatal error file node-sass node command failed nginx quot directory failed node-sass install command failed directory fatal error zlib