Skip to content

Commit

Permalink
Ensure --forceExit works without warning (#5245)
Browse files Browse the repository at this point in the history
Ensure force-exit actually works
  • Loading branch information
lukastaegert committed Nov 11, 2023
1 parent ef3be44 commit ae249cb
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 5 deletions.
1 change: 1 addition & 0 deletions src/utils/options/mergeOptions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ export async function mergeOptions(
'environment',
'failAfterWarnings',
'filterLogs',
'forceExit',
'plugin',
'silent',
'stdin',
Expand Down
3 changes: 1 addition & 2 deletions test/cli/samples/force-exit/_config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
module.exports = defineTest({
description: 'force exits even with open handles',
command: 'rollup --config rollup.config.js --forceExit',
execute: true
command: 'rollup --config rollup.config.js --forceExit'
});
2 changes: 2 additions & 0 deletions test/cli/samples/force-exit/_expected.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
console.log('ok');

1 change: 1 addition & 0 deletions test/cli/samples/force-exit/main.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
console.log('ok');
4 changes: 2 additions & 2 deletions test/cli/samples/force-exit/rollup.config.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
module.exports = {
input: 'main.js',
output: {
format: 'cjs'
onwarn(warning) {
throw new Error(`Unexpected warning: ${warning.message}`);
},
plugins: [
{
Expand Down
2 changes: 1 addition & 1 deletion test/misc/optionList.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit ae249cb

Please sign in to comment.