From de7263569c14ea8dd215497ccc76710c99c315dc Mon Sep 17 00:00:00 2001 From: sloray Date: Thu, 15 Oct 2026 23:21:16 +0800 Subject: [PATCH] =?UTF-8?q?ci:=20Windows=20=E7=9A=84=20pnpm=20=E5=AE=89?= =?UTF-8?q?=E8=A3=85=E7=9B=AE=E5=BD=95=E6=94=B9=E6=88=90=E6=AF=8F=E6=AC=A1?= =?UTF-8?q?=E8=BF=90=E8=A1=8C=E9=83=BD=E5=B9=B2=E5=87=80=E7=9A=84=E8=B7=AF?= =?UTF-8?q?=E5=BE=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit run 13 里 装 Rust 这次是好的(上次那个 panic 是两轮运行重叠、同时写 ci-rustup 造成的), 但 装 pnpm 挂了: [Error: ENOTEMPTY: directory not empty, rmdir 'C:\Users\admin\runner\windows\cache\ci-pnpm\node_modules\.bin\store\v11\projects'] 原因是这个 dest 是固定路径:pnpm 把自己算出来的 store 建在 dest 里面(就是之前日志里 那个很怪的 \node_modules\.bin\store\v11),下一轮 action 的自安装器要清掉旧目录 时,嵌套的 store\v11\projects 非空,rmdir 就失败了。 改成 ${{ github.workspace }}\..\ci-pnpm —— 落在本次运行的 work 目录里,每次都是干净的, 同时也还满足"低完整性只能写 runner 自己的工作目录"。机器上那个被污染的 cache\ci-pnpm 已经删掉。 --- .github/workflows/build-client.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-client.yml b/.github/workflows/build-client.yml index 0bcfd1d..c06044d 100644 --- a/.github/workflows/build-client.yml +++ b/.github/workflows/build-client.yml @@ -431,8 +431,12 @@ jobs: uses: pnpm/action-setup@v4 with: version: ${{ env.PNPM_VERSION }} - # 默认 dest 是 ~/setup-pnpm,而 ~ 是中完整性的,低完整性写不进去。 - dest: C:\Users\admin\runner\windows\cache\ci-pnpm + # 两个原因不用默认的 ~/setup-pnpm(中完整性写不进去),也不用固定的 + # cache 目录:pnpm 会把自己算出来的 store 建在这个 dest 里面,下一次运行 + # 自安装器清理旧目录时就炸了 —— + # ENOTEMPTY: directory not empty, rmdir '...\ci-pnpm\node_modules\.bin\store\v11\projects' + # 所以放到本次运行的 work 目录下(每次都是干净的)。 + dest: ${{ github.workspace }}\..\ci-pnpm - name: 装 Node uses: actions/setup-node@v4