cli: blocking IO for test --help

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
This commit is contained in:
Patrik Oldsberg
2022-06-29 18:35:59 +02:00
parent c1f4ad85d5
commit f6b6fb7165
2 changed files with 9 additions and 0 deletions
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/cli': patch
---
The `test` command now ensures that all IO is flushed before exiting when printing `--help`.
+4
View File
@@ -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);
};