Skip to content
This repository has been archived by the owner on Feb 7, 2022. It is now read-only.

Prevent async writes from being terminated before being written #87

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Change Log

# master
- Switch from `process.exit()` to `process.exitCode` to prevent cutting off async writes

## [v2.3.0](https://github.com/trivago/parallel-webpack/tree/v2.3.0) (2018-02-26)
[Full Changelog](https://github.com/trivago/parallel-webpack/compare/v2.2.0...v2.3.0)

Expand Down
4 changes: 2 additions & 2 deletions bin/run.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ if(argv.version) {
}
}).catch(function(err) {
console.log(err.message);
process.exit(1);
process.exitCode = 1;
});
} catch (e) {
if(e.message) {
Expand All @@ -65,6 +65,6 @@ if(argv.version) {
} else {
process.stdout.write(chalk.red('[WEBPACK]') + ' Could not load configuration ' + chalk.underline(process.cwd() + '/' + argv.config) + "\n");
}
process.exit(1);
process.exitCode = 1;
}
}
2 changes: 1 addition & 1 deletion src/webpackWorker.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ module.exports = function(configuratorFileName, options, index, expectedConfigLe
done({
message: chalk.red('[WEBPACK]') + ' Forcefully shut down ' + chalk.yellow(getAppName(webpackConfig))
});
process.exit(0);
process.exitCode = 0;
},
finishedCallback = function(err, stats) {
if(err) {
Expand Down