diff --git a/bin/mac-uninstall-brew.sh b/bin/mac-uninstall-brew.sh index fcff2db..4af0736 100755 --- a/bin/mac-uninstall-brew.sh +++ b/bin/mac-uninstall-brew.sh @@ -47,10 +47,6 @@ echo "Removing other things that may upgrade if user reinstalls..." sudo rm -rf ~/Library/Caches/pip sudo rm -rf ~/.npm sudo rm -rf ~/.yarnrc -# NOTE(john): We could delete the pnpm store, however pnpm's store isn't -# just a cache, it's all the packages installed by pnpm. It symlinks to -# the global store, so deleting it would require reinstalling all the -# packages. If we do want to delete it, I think this would work: -# sudo rm -rf "$(pnpm store path)" +pnpm store prune sudo rm -rf ~/go echo "Done" diff --git a/containers/kabuild/Dockerfile b/containers/kabuild/Dockerfile index 86d7ac7..8e3b533 100644 --- a/containers/kabuild/Dockerfile +++ b/containers/kabuild/Dockerfile @@ -81,8 +81,8 @@ RUN apt-get install -y \ RUN pip3 install -q pipenv RUN npm install -g yarn # Install pnpm, following: -# https://pnpm.io/installation -RUN wget -qO- https://get.pnpm.io/install.sh | ENV="$HOME/.bashrc" SHELL="$(which bash)" bash - +# https://pnpm.io/installation#using-corepack +RUN corepack enable pnpm # protoc RUN mkdir -p /tmp/protoc diff --git a/setup.sh b/setup.sh index e3a9e8c..343a1c5 100755 --- a/setup.sh +++ b/setup.sh @@ -255,9 +255,15 @@ install_deps() { # Need to install pnpm first before run `make install_deps` # in webapp. + # Following: https://pnpm.io/installation#using-corepack echo "Installing pnpm" if ! which pnpm >/dev/null 2>&1; then - curl -fsSL https://get.pnpm.io/install.sh | env PNPM_VERSION=10.0.0 sh - + if [ -n "${IS_MAC}" ]; then + if ! which corepack >/dev/null 2>&1; then + brew install corepack + fi + fi + corepack enable pnpm fi # By default, third party Go tools are install to this directory