mirror of
https://github.com/pnpm/pnpm.git
synced 2026-01-11 00:18:32 -05:00
6
.changeset/happy-crabs-perform.md
Normal file
6
.changeset/happy-crabs-perform.md
Normal file
@@ -0,0 +1,6 @@
|
||||
---
|
||||
"@pnpm/plugin-commands-script-runners": patch
|
||||
"pnpm": patch
|
||||
---
|
||||
|
||||
`pnpm dlx` shouldn't modify the lockfile in the current working directory [#4743](https://github.com/pnpm/pnpm/issues/4743).
|
||||
@@ -9,6 +9,7 @@ import { fromDir as readPkgFromDir } from '@pnpm/read-package-json'
|
||||
import packageBins from '@pnpm/package-bins'
|
||||
import storePath from '@pnpm/store-path'
|
||||
import execa from 'execa'
|
||||
import omit from 'ramda/src/omit'
|
||||
import renderHelp from 'render-help'
|
||||
import { makeEnv } from './makeEnv'
|
||||
|
||||
@@ -71,9 +72,10 @@ export async function handler (
|
||||
const pkgs = opts.package ?? [command]
|
||||
const env = makeEnv({ userAgent: opts.userAgent, prependPaths: [binsDir] })
|
||||
await add.handler({
|
||||
...opts,
|
||||
dir: prefix,
|
||||
...omit(['workspaceDir'], opts),
|
||||
bin: binsDir,
|
||||
dir: prefix,
|
||||
lockfileDir: prefix,
|
||||
}, pkgs)
|
||||
const binName = opts.package
|
||||
? command
|
||||
|
||||
Reference in New Issue
Block a user