Skip to content

Commit 52c3bcb

Browse files
authored
chore: swallow non-critical error within test helpers (lerna#4034)
1 parent 1a210df commit 52c3bcb

File tree

1 file changed

+9
-5
lines changed
  • libs/test-helpers/src/lib

1 file changed

+9
-5
lines changed

libs/test-helpers/src/lib/cli.ts

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,15 @@ export function commandRunner(commandModule: yargs.CommandModule) {
1717

1818
// eslint-disable-next-line @typescript-eslint/no-var-requires
1919

20-
// prime the pump so slow-as-molasses CI doesn't fail with delayed require()
21-
// TODO: refactor to address type issues
22-
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
23-
// @ts-ignore
24-
require(path.resolve(require.main.filename, "../../"));
20+
try {
21+
// prime the pump so slow-as-molasses CI doesn't fail with delayed require()
22+
// TODO: refactor to address type issues
23+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
24+
// @ts-ignore
25+
require(path.resolve(require.main.filename, "../../"));
26+
} catch {
27+
/* empty */
28+
}
2529

2630
return (cwd: string) => {
2731
// create a _new_ yargs instance every time cwd changes to avoid singleton pollution

0 commit comments

Comments
 (0)