Skip to content

Commit

Permalink
Merge pull request #1324 from snyk/fix/json-output-hotfix
Browse files Browse the repository at this point in the history
fix(test): json output with all-projects flag
  • Loading branch information
JackuB committed Aug 12, 2020
2 parents 3eb729b + 8258ef0 commit d290542
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions src/lib/snyk-test/run-test.ts
Expand Up @@ -360,13 +360,15 @@ async function assembleLocalPayloads(
const failedResults = (deps as MultiProjectResultCustom).failedResults;
if (failedResults?.length) {
await spinner.clear<void>(spinnerLbl)();
console.warn(
chalk.bold.red(
`✗ ${failedResults.length}/${failedResults.length +
deps.scannedProjects
.length} potential projects failed to get dependencies. Run with \`-d\` for debug output.`,
),
);
if (!options.json) {
console.warn(
chalk.bold.red(
`✗ ${failedResults.length}/${failedResults.length +
deps.scannedProjects
.length} potential projects failed to get dependencies. Run with \`-d\` for debug output.`,
),
);
}
}
analytics.add('pluginName', deps.plugin.name);
const javaVersion = _.get(
Expand Down

0 comments on commit d290542

Please sign in to comment.