build(devcontainer): 调整 pnpm LTS 版本配置时机

将 `pnpm env use lts --global` 命令从 Dockerfile 和 postCreateCommand 中移除,
并在 devcontainer.json 的 onCreateCommand 阶段添加该命令

[skip ci]
This commit is contained in:
严浩
2025-11-09 22:20:34 +08:00
parent fdf928028c
commit ac7cb6a31c
2 changed files with 2 additions and 3 deletions

View File

@@ -96,5 +96,4 @@ RUN sh -c "$(curl -L -o - https://github.com/deluan/zsh-in-docker/releases/downl
RUN wget -qO- https://get.pnpm.io/install.sh | ENV="$HOME/.zshrc" SHELL="$(which zsh)" zsh - \
&& pnpm --version \
# /home/usr_vscode/.config/pnpm/rc
&& pnpm config --global set store-dir /home/usr_vscode/.pnpm-store \
&& pnpm env use lts --global
&& pnpm config --global set store-dir /home/usr_vscode/.pnpm-store