Skip to content

Commit 8469ca6

Browse files
committed
chore(devcontainer): bootstrap pnpm via corepack when missing
1 parent 5011354 commit 8469ca6

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

‎.devcontainer/postCreate.sh‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,12 @@
1+
export COREPACK_ENABLE_DOWNLOAD_PROMPT=0
2+
3+
# Automatically install pnpm via corepack if not found
4+
if ! command -v pnpm >/dev/null 2>&1
5+
then
6+
npm i -g --no-update-notifier corepack@latest @antfu/ni
7+
corepack install
8+
corepack enable pnpm
9+
fi
10+
111
# Force pnpm to use global store instead of $PWD, ref: https://stackoverflow.com/questions/76573556/pnpm-use-docker-volume-as-store-path
212
pnpm config -g set store-dir $PNPM_HOME/store

0 commit comments

Comments
 (0)