Skip to content

Commit 1d4bb2d

Browse files
fix(publish_yalc_package): move pkgJson parsing out of conditional block
so the result can be used below
1 parent 41cbd85 commit 1d4bb2d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

publish_yalc_package.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,9 +84,9 @@ function publishYalcPackage(installTargetDir, installSource, flags) {
8484
shelljs.mv(installTargetDir, TEMP_DIR);
8585
process.chdir(BUILD_TEMP_DIR);
8686

87+
const pkgJson = JSON.parse(fs.readFileSync('package.json'));
8788
if (!flags.noBuild) {
8889
// Build package
89-
const pkgJson = JSON.parse(fs.readFileSync('package.json'));
9090
if (pkgJson.scripts && pkgJson.scripts.build) {
9191
util._exec('npm run build');
9292
}

0 commit comments

Comments
 (0)