From 4009180cc40be6c28d598cc375e99f6b0e51ceb3 Mon Sep 17 00:00:00 2001 From: Nikhil Bhoski <47204011+nbhoski@users.noreply.github.com> Date: Tue, 2 Jul 2024 10:55:26 +0530 Subject: [PATCH] Handdled errors close to the functions --- src/index.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/index.ts b/src/index.ts index 7c531b3..f5e6fe0 100644 --- a/src/index.ts +++ b/src/index.ts @@ -38,7 +38,11 @@ async function run() { (cmd, args) => exec.exec(cmd, args, execOptions), startupOptions ).finally(() => { - buildSummary.processAndDisplayBuildSummary(); + try { + buildSummary.processAndDisplayBuildSummary(); + } catch (e) { + console.error('An error occurred while reading the build summary file:', e); + } }); }