mirror of
https://github.com/pnpm/action-setup.git
synced 2026-03-16 23:36:11 +08:00
fix: use --no-lockfile for target install
--lockfile-dir pointing to GITHUB_WORKSPACE causes the bootstrap pnpm to use the project's pnpm-lock.yaml (which tracks project deps, not pnpm itself), corrupting the install. Revert to --no-lockfile for now. Lockfile-based integrity verification can be added when pnpm v11 has proper support for verifying the pnpm package itself. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2
dist/index.js
vendored
2
dist/index.js
vendored
File diff suppressed because one or more lines are too long
@@ -47,12 +47,7 @@ export async function runSelfInstaller(inputs: Inputs): Promise<number> {
|
|||||||
|
|
||||||
// prepare target pnpm
|
// prepare target pnpm
|
||||||
const target = await readTarget({ version, packageJsonFile, standalone })
|
const target = await readTarget({ version, packageJsonFile, standalone })
|
||||||
const installArgs = ['install', target]
|
const installArgs = ['install', target, '--no-lockfile']
|
||||||
if (GITHUB_WORKSPACE) {
|
|
||||||
installArgs.push('--lockfile-dir', GITHUB_WORKSPACE)
|
|
||||||
} else {
|
|
||||||
installArgs.push('--no-lockfile')
|
|
||||||
}
|
|
||||||
const exitCode = await runCommand(bootstrapPnpm, installArgs, { cwd: dest })
|
const exitCode = await runCommand(bootstrapPnpm, installArgs, { cwd: dest })
|
||||||
if (exitCode === 0) {
|
if (exitCode === 0) {
|
||||||
const pnpmHome = path.join(dest, 'node_modules/.bin')
|
const pnpmHome = path.join(dest, 'node_modules/.bin')
|
||||||
|
|||||||
Reference in New Issue
Block a user