Skip to content

Commit 9b180f0

Browse files
committed
try to fix missing dist files in published packages
1 parent 4013433 commit 9b180f0

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

utils/publish_release.js

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -79,9 +79,10 @@ packages.forEach((packageName) => {
7979
const npmOptions = {
8080
cwd: path.resolve(argv.packagesDir, packageName)
8181
};
82+
const runArgs = [...npmArgs, path.resolve(argv.packagesDir, packageName)];
8283
if (argv.debug) {
8384
/* eslint-disable no-console */
84-
console.log('running npm with args', npmArgs, 'options ', npmOptions);
85+
console.log('running npm with args', runArgs, 'options ', npmOptions);
8586
/* eslint-enable no-console */
8687
}
8788
if (argv.dryRun) {
@@ -90,7 +91,7 @@ packages.forEach((packageName) => {
9091
} else {
9192
execFile(
9293
'npm',
93-
npmArgs,
94+
runArgs,
9495
npmOptions,
9596
(error, stdout, stderr) => {
9697
if (error) {
@@ -114,12 +115,13 @@ const npmOptions = {
114115
};
115116
const packageJSON = JSON.parse(
116117
fs.readFileSync(path.resolve(argv.mainDir, 'package.json')));
118+
const runArgs = [...npmArgs, path.resolve(argv.mainDir)];
117119

118120
// eslint-disable-next-line no-console
119121
console.info('processing', packageJSON.name);
120122
if (argv.debug) {
121123
/* eslint-disable no-console */
122-
console.log('running npm with args', npmArgs, 'options ', npmOptions);
124+
console.log('running npm with args', runArgs, 'options ', npmOptions);
123125
/* eslint-enable no-console */
124126
}
125127
if (argv.dryRun) {
@@ -128,7 +130,7 @@ if (argv.dryRun) {
128130
} else {
129131
execFile(
130132
'npm',
131-
npmArgs,
133+
runArgs,
132134
npmOptions,
133135
(error, stdout, stderr) => {
134136
if (error) {

0 commit comments

Comments
 (0)