想要导出文档的tree树形结构,需要安装tree命令
1.安装tree命令 brew install tree
出现报错
brew install tree
Warning: No available formula or cask with the name "ca-certificates".
==> Searching for similarly named formulae...
Error: No similarly named formulae found.
==> Searching for a previously deleted formula (in the last month)...
Warning: homebrew/core is shallow clone. To get its complete history, run:
git -C "$(brew --repo homebrew/core)" fetch --unshallow
Error: No previously deleted formula found.
==> Searching taps on GitHub...
Updating Homebrew...
Error: No formulae found in taps.
Error:
homebrew-core is a shallow clone.
To `brew update`, first run:
git -C /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core fetch --unshallow
This command may take a few minutes to run due to the large size of the repository.
This restriction has been made on GitHub's request because updating shallow
clones is an extremely expensive operation due to the tree layout and traffic of
Homebrew/homebrew-core and Homebrew/homebrew-cask. We don't do this for you
automatically to avoid repeatedly performing an expensive unshallow operation in
CI systems (which should instead be fixed to not use shallow clones). Sorry for
the inconvenience!
Error: tree: undefined method `cellar' for #<BottleSpecification:0x00007fa0df1b9658>
复制代码
2.进入homebrew,重新安装 homebrew-core
cd /usr/local/Homebrew/Library/Taps/homebrew/
rm -rf homebrew-core
git clone https://github.com/Homebrew/homebrew-core.git
复制代码
3.成功安装完成homebrew-core,进行brew更新
brew update
复制代码
4.更新完成,安装tree