Skip to content

Commit

Permalink
Re-trow original error with lockfile fails
Browse files Browse the repository at this point in the history
  • Loading branch information
0x80 committed Jul 15, 2024
1 parent 6c5668a commit 22ef469
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
3 changes: 2 additions & 1 deletion src/lib/lockfile/helpers/generate-npm-lockfile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ export async function generateNpmLockfile({

log.debug("Created lockfile at", lockfilePath);
} catch (err) {
throw new Error(`Failed to generate lockfile: ${getErrorMessage(err)}`);
log.error(`Failed to generate lockfile: ${getErrorMessage(err)}`);
throw err;
}
}
3 changes: 2 additions & 1 deletion src/lib/lockfile/helpers/generate-pnpm-lockfile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,7 @@ export async function generatePnpmLockfile({

log.debug("Created lockfile at", path.join(isolateDir, "pnpm-lock.yaml"));
} catch (err) {
throw new Error(`Failed to generate lockfile: ${getErrorMessage(err)}`);
log.error(`Failed to generate lockfile: ${getErrorMessage(err)}`);
throw err;
}
}
3 changes: 2 additions & 1 deletion src/lib/lockfile/helpers/generate-yarn-lockfile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ export async function generateYarnLockfile({

log.debug("Generated lockfile at", newLockfilePath);
} catch (err) {
throw new Error(`Failed to generate lockfile: ${getErrorMessage(err)}`);
log.error(`Failed to generate lockfile: ${getErrorMessage(err)}`);
throw err;
}
}

0 comments on commit 22ef469

Please sign in to comment.