Skip to content

Commit

Permalink
chore: swallow non-critical error within test helpers (lerna#4034)
Browse files Browse the repository at this point in the history
  • Loading branch information
JamesHenry authored Jun 24, 2024
1 parent 1a210df commit 52c3bcb
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions libs/test-helpers/src/lib/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 52c3bcb

Please sign in to comment.