Skip to content

Commit 3f40bd1

Browse files
committed
Fix: Unhandled promise rejections are deprecated. -- exits now with code 1 instead, fixes#11
1 parent 85e2c2e commit 3f40bd1

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

bin/angular-cli-ghpages

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,7 @@ program
1717
.option('-T, --no-dotfiles', 'Includes dotfiles by default. When set files starting with `.` are ignored.')
1818
.parse(process.argv);
1919

20-
index.run(program);
20+
index.run(program)
21+
.catch(function(error) {
22+
process.exit(1);
23+
})

index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ exports.run = function (options) {
5959
console.log('Successfully published!\n');
6060
})
6161
.catch(function (error) {
62-
console.error('An error occurred!\n');
62+
console.error('An error occurred!\n', error);
6363
return Promise.reject(error);
6464
});
6565
};

0 commit comments

Comments
 (0)