Skip to content

Commit

Permalink
fix(components-scan): remove the process.exit(-1) and display the sta…
Browse files Browse the repository at this point in the history
…ck error directly

Related: #1794
  • Loading branch information
Romakita committed Apr 30, 2022
1 parent e0fdf9e commit 75c64be
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions packages/third-parties/components-scan/src/importFiles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,8 @@ export async function importFiles(patterns: string | string[], exclude: string[]
for (const file of files.sort((a, b) => (a < b ? -1 : 1))) {
if (!file.endsWith(".d.ts")) {
// prevent .d.ts import if the global pattern isn't correctly configured
try {
const exports = await importPackage(file);
Object.keys(exports).forEach((key) => symbols.push(exports[key]));
} catch (er) {
// istanbul ignore next
console.error(er);
// istanbul ignore next
process.exit(1);
}
const exports = await importPackage(file);
Object.keys(exports).forEach((key) => symbols.push(exports[key]));
}
}

Expand Down

0 comments on commit 75c64be

Please sign in to comment.