cli: blocking IO for test --help
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@backstage/cli': patch
|
||||
---
|
||||
|
||||
The `test` command now ensures that all IO is flushed before exiting when printing `--help`.
|
||||
@@ -78,6 +78,10 @@ export default async (_opts: OptionValues, cmd: Command) => {
|
||||
process.env.TZ = 'UTC';
|
||||
}
|
||||
|
||||
if (args.includes('--help')) {
|
||||
(process.stdout as any)._handle.setBlocking(true);
|
||||
}
|
||||
|
||||
// eslint-disable-next-line jest/no-jest-import
|
||||
await require('jest').run(args);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user