Skip to content

Commit c34a40c

Browse files
committed
feat(pack): 打包报错后以返回码 1 退出
1 parent eb31f36 commit c34a40c

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

lib/models/Project.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -527,6 +527,7 @@ var Project = function () {
527527
statsInfo.errors.map(function (err) {
528528
error('[Bundle Error]: ' + err.red + '\n');
529529
});
530+
process.exit(1);
530531
}
531532
if (statsInfo.warnings.length > 0) {
532533
statsInfo.warnings.map(function (warning) {

src/models/Project.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -470,7 +470,7 @@ class Project {
470470
spinner.text = `[Minify] ${assetsInfo.length -
471471
processToRun}/${assetsInfo.length} assets`;
472472

473-
if (processToRun === 0) {
473+
if(processToRun === 0) {
474474
cc.exit();
475475
spinner.stop();
476476

@@ -517,6 +517,7 @@ class Project {
517517
statsInfo.errors.map(err => {
518518
error('[Bundle Error]: ' + err.red + '\n');
519519
});
520+
process.exit(1);
520521
}
521522
if (statsInfo.warnings.length > 0) {
522523
statsInfo.warnings.map(warning => {

0 commit comments

Comments
 (0)