diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index 5637fd17..c2f70997 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -56,7 +56,15 @@ jobs: # pinned version itself. Version is read from package.json's # packageManager field so it cannot drift from the lockfile. - name: Install pnpm (version from packageManager field) - run: npm install -g "pnpm@$(node -p "require('./package.json').packageManager.split('@')[1].split('+')[0]")" + # The runner's cached Node toolchain keeps a corepack `pnpm` shim from + # earlier runs, and npm refuses to overwrite it (EEXIST, run #1855) — + # drop the shim first so the real binary lands. + run: | + B="$(dirname "$(command -v node)")" + corepack disable pnpm 2>/dev/null || true + rm -f "$B/pnpm" "$B/pnpx" + npm install -g "pnpm@$(node -p "require('./package.json').packageManager.split('@')[1].split('+')[0]")" + pnpm --version - name: Install dependencies run: pnpm install --frozen-lockfile @@ -125,7 +133,15 @@ jobs: # pinned version itself. Version is read from package.json's # packageManager field so it cannot drift from the lockfile. - name: Install pnpm (version from packageManager field) - run: npm install -g "pnpm@$(node -p "require('./package.json').packageManager.split('@')[1].split('+')[0]")" + # The runner's cached Node toolchain keeps a corepack `pnpm` shim from + # earlier runs, and npm refuses to overwrite it (EEXIST, run #1855) — + # drop the shim first so the real binary lands. + run: | + B="$(dirname "$(command -v node)")" + corepack disable pnpm 2>/dev/null || true + rm -f "$B/pnpm" "$B/pnpx" + npm install -g "pnpm@$(node -p "require('./package.json').packageManager.split('@')[1].split('+')[0]")" + pnpm --version - name: Install dependencies run: pnpm install --frozen-lockfile