mirror of
https://github.com/Microsoft/vscode
synced 2024-10-01 08:50:48 +00:00
catch unhandled promise rejections in build
This commit is contained in:
parent
2cdc2b3da8
commit
5ba8940d62
|
@ -229,6 +229,11 @@ gulp.task('hygiene', () => hygiene());
|
|||
if (require.main === module) {
|
||||
const cp = require('child_process');
|
||||
|
||||
process.on('unhandledRejection', (reason, p) => {
|
||||
console.log('Unhandled Rejection at: Promise', p, 'reason:', reason);
|
||||
process.exit(1);
|
||||
});
|
||||
|
||||
cp.exec('git config core.autocrlf', (err, out) => {
|
||||
const skipEOL = out.trim() === 'true';
|
||||
|
||||
|
|
|
@ -58,8 +58,14 @@ var ALL_EDITOR_TASKS = [
|
|||
'tslint',
|
||||
'hygiene',
|
||||
];
|
||||
|
||||
var runningEditorTasks = process.argv.length > 2 && process.argv.slice(2).every(function (arg) { return (ALL_EDITOR_TASKS.indexOf(arg) !== -1); });
|
||||
|
||||
process.on('unhandledRejection', (reason, p) => {
|
||||
console.log('Unhandled Rejection at: Promise', p, 'reason:', reason);
|
||||
process.exit(1);
|
||||
});
|
||||
|
||||
if (runningEditorTasks) {
|
||||
require(`./build/gulpfile.editor`);
|
||||
require(`./build/gulpfile.hygiene`);
|
||||
|
|
Loading…
Reference in a new issue