Skip to content

Commit 6b593e8

Browse files
committed
Add error handler for cordova build promise
1 parent 0ac3853 commit 6b593e8

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

scripts/cordova/build.js

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,16 @@ const cordovaBuild = (options) => {
3232
process.chdir('./cordova');
3333

3434
// build with options and distribute to Fabric if specified
35-
return cordova.raw.build(buildOpts).then(function() {
36-
if (distribute) {
37-
fabric.distribute(platforms, target);
35+
return cordova.raw.build(buildOpts).then(
36+
function() {
37+
if (distribute) {
38+
fabric.distribute(platforms, target);
39+
}
40+
},
41+
function(error) {
42+
console.log('Build failed:', error);
3843
}
39-
});
44+
);
4045
};
4146

4247
module.exports = cordovaBuild;

0 commit comments

Comments
 (0)