Skip to content

Commit 5cdf394

Browse files
committed
Use more distPath
1 parent c1eafd4 commit 5cdf394

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

bin/cli.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,23 +3,23 @@
33

44
const constants = require('../dist/constants')
55

6-
const { DIST_TYPE } = constants
6+
const { DIST_TYPE, distPath } = constants
77

88
if (DIST_TYPE === 'require') {
9-
require(`../dist/${DIST_TYPE}/cli.js`)
9+
require(`${distPath}/cli.js`)
1010
} else {
1111
const path = require('node:path')
1212
const spawn = require('@npmcli/promise-spawn')
1313

14-
const { abortSignal, execPath, rootDistPath } = constants
14+
const { abortSignal, distPath, execPath } = constants
1515

1616
process.exitCode = 1
1717
const spawnPromise = spawn(
1818
execPath,
1919
[
2020
// Lazily access constants.nodeNoWarningsFlags.
2121
...constants.nodeNoWarningsFlags,
22-
path.join(rootDistPath, DIST_TYPE, 'cli.js'),
22+
path.join(distPath, 'cli.js'),
2323
...process.argv.slice(2)
2424
],
2525
{

0 commit comments

Comments
 (0)