File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change 3
3
4
4
const constants = require ( '../dist/constants' )
5
5
6
- const { DIST_TYPE } = constants
6
+ const { DIST_TYPE , distPath } = constants
7
7
8
8
if ( DIST_TYPE === 'require' ) {
9
- require ( `../dist/ ${ DIST_TYPE } /cli.js` )
9
+ require ( `${ distPath } /cli.js` )
10
10
} else {
11
11
const path = require ( 'node:path' )
12
12
const spawn = require ( '@npmcli/promise-spawn' )
13
13
14
- const { abortSignal, execPath , rootDistPath } = constants
14
+ const { abortSignal, distPath , execPath } = constants
15
15
16
16
process . exitCode = 1
17
17
const spawnPromise = spawn (
18
18
execPath ,
19
19
[
20
20
// Lazily access constants.nodeNoWarningsFlags.
21
21
...constants . nodeNoWarningsFlags ,
22
- path . join ( rootDistPath , DIST_TYPE , 'cli.js' ) ,
22
+ path . join ( distPath , 'cli.js' ) ,
23
23
...process . argv . slice ( 2 )
24
24
] ,
25
25
{
You can’t perform that action at this time.
0 commit comments