Skip to content

Commit

Permalink
Fix "wget: command not found" error when installing ccache
Browse files Browse the repository at this point in the history
In "Install FMT and download ccache on MacOS (facebookincubator#10933)", wget was used to
download ccache in setup-macos.sh. However, wget is not pre-installed
on MacOs by default, and the following error was thrown:

+ wget -O ccache.tar.gz https://github.com/ccache/ccache/releases/download/v4.10.2/ccache-4.10.2-darwin.tar.gz
../scripts/setup-macos.sh: line 80: wget: command not found
+ tar -xf ccache.tar.gz
tar: Error opening archive: Failed to open 'ccache.tar.gz'

This commit changes wget to curl, which is guaranteed to be pre-installed
on MacOS.
  • Loading branch information
yingsu00 committed Sep 13, 2024
1 parent 98bbb73 commit 3263720
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/setup-macos.sh
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ function install_build_prerequisites {
python3 -m venv ${PYTHON_VENV}
fi
source ${PYTHON_VENV}/bin/activate; pip3 install cmake-format regex pyyaml
wget -O ccache.tar.gz https://github.com/ccache/ccache/releases/download/v4.10.2/ccache-4.10.2-darwin.tar.gz
curl -L https://github.com/ccache/ccache/releases/download/v4.10.2/ccache-4.10.2-darwin.tar.gz > ccache.tar.gz
tar -xf ccache.tar.gz
mv ccache-4.10.2-darwin/ccache /usr/local/bin/
}
Expand Down

0 comments on commit 3263720

Please sign in to comment.