From 52c3bcb5a74a750f9ed93bb6e4c0e6dd1c385ef9 Mon Sep 17 00:00:00 2001 From: James Henry Date: Mon, 24 Jun 2024 23:37:47 +0400 Subject: [PATCH] chore: swallow non-critical error within test helpers (#4034) --- libs/test-helpers/src/lib/cli.ts | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/libs/test-helpers/src/lib/cli.ts b/libs/test-helpers/src/lib/cli.ts index cbfa08839f..6a3f200f7e 100644 --- a/libs/test-helpers/src/lib/cli.ts +++ b/libs/test-helpers/src/lib/cli.ts @@ -17,11 +17,15 @@ export function commandRunner(commandModule: yargs.CommandModule) { // eslint-disable-next-line @typescript-eslint/no-var-requires - // prime the pump so slow-as-molasses CI doesn't fail with delayed require() - // TODO: refactor to address type issues - // eslint-disable-next-line @typescript-eslint/ban-ts-comment - // @ts-ignore - require(path.resolve(require.main.filename, "../../")); + try { + // prime the pump so slow-as-molasses CI doesn't fail with delayed require() + // TODO: refactor to address type issues + // eslint-disable-next-line @typescript-eslint/ban-ts-comment + // @ts-ignore + require(path.resolve(require.main.filename, "../../")); + } catch { + /* empty */ + } return (cwd: string) => { // create a _new_ yargs instance every time cwd changes to avoid singleton pollution