Skip to content

Commit 6ec1575

Browse files
fix: align fail fast logic [CSENG-173]
1 parent 8375506 commit 6ec1575

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

src/lib/plugins/get-deps-from-plugin.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ export async function getDepsFromPlugin(
113113
} catch (error) {
114114
if (options['print-effective-graph-with-errors']) {
115115
const errMessage =
116-
error.message ?? 'Something went wrong getting dependencies';
116+
error?.message ?? 'Something went wrong getting dependencies';
117117
debug(
118118
`Single plugin scan failed for ${options.file}, collecting as failed result: ${errMessage}`,
119119
);

src/lib/plugins/get-multi-plugin-result.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -183,9 +183,9 @@ export async function getMultiPluginResult(
183183
}
184184

185185
if (!allResults.length) {
186-
// When allow-incomplete-sbom is active (effective-graph-with-errors + no fail-fast),
187-
// return instead of throwing so the caller can print per-project JSONL error entries
188-
if (options['print-effective-graph-with-errors'] && !options['fail-fast']) {
186+
// When allow-incomplete-sbom is active, return instead of throwing
187+
// so the caller can print per-project JSONL error entries
188+
if (options['print-effective-graph-with-errors']) {
189189
return {
190190
plugin: {
191191
name: 'custom-auto-detect',

0 commit comments

Comments
 (0)