Skip to content

Commit 9d0f1d0

Browse files
committed
No longer need to set the NPM_VERSION env var
1 parent 910c8cd commit 9d0f1d0

File tree

1 file changed

+1
-9
lines changed

1 file changed

+1
-9
lines changed

src/commands/npm.ts

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import { execSync } from 'node:child_process'
21
import path from 'node:path'
32

43
import spawn from '@npmcli/promise-spawn'
@@ -11,16 +10,9 @@ const description = 'npm wrapper functionality'
1110
export const npm: CliSubcommand = {
1211
description,
1312
async run(argv, _importMeta, _ctx) {
14-
const npmVersion = execSync('npm -v').toString()
15-
const wrapperPath = path.join(distPath, 'npm-cli.js')
16-
1713
process.exitCode = 1
18-
14+
const wrapperPath = path.join(distPath, 'npm-cli.js')
1915
const spawnPromise = spawn(process.execPath, [wrapperPath, ...argv], {
20-
env: {
21-
...process.env,
22-
NPM_VERSION: npmVersion
23-
},
2416
stdio: 'inherit'
2517
})
2618
spawnPromise.process.on('exit', (code, signal) => {

0 commit comments

Comments
 (0)