From ac820e370dd4e320597b6254deefa10e01da4593 Mon Sep 17 00:00:00 2001 From: Leo Goetz Date: Mon, 18 May 2026 10:39:49 +0200 Subject: feat: added error warning when lock is corrupted --- src/actions/checkDependencies.ts | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'src/actions') diff --git a/src/actions/checkDependencies.ts b/src/actions/checkDependencies.ts index e728f3a..9766fa4 100644 --- a/src/actions/checkDependencies.ts +++ b/src/actions/checkDependencies.ts @@ -28,7 +28,7 @@ export async function checkDependencies() { if (result.status === "fulfilled") { projectAudits.push(result.value); } else { - console.log("audit failed:", result.reason); + spinner.warn(result.reason); } } @@ -46,7 +46,7 @@ function getAuditPromise( dirname: string, spinner: any, ): Promise { - return new Promise(async (resolve, _) => { + return new Promise(async (resolve, reject) => { spinner.text = "pulling latest"; await promiseExec(`cd "${path}" && git pull `, () => {}); spinner.text = "getting audit"; @@ -55,6 +55,11 @@ function getAuditPromise( (_: any, stdout: string) => { let output = JSON.parse(stdout); let project: Project = { projectName: dirname, ...output }; + if (project.error) { + reject( + `${dirname} could not be audited, maybe package lock is corrupted`, + ); + } resolve(project); }, ); -- cgit v1.3.1