Skip to content

Commit

Permalink
Merge pull request #1361 from snyk/fix/snyk-test-fails-with-reachable…
Browse files Browse the repository at this point in the history
…-vulns-and-all-projects

fix: check if scanned project does have a callgraph
  • Loading branch information
Dar Malovani committed Aug 25, 2020
2 parents 2582bda + 2d11938 commit 1f5c7e9
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/lib/snyk-test/run-test.ts
Expand Up @@ -533,10 +533,7 @@ async function assembleLocalPayloads(
body.depGraph = depGraph;
}

if (
options.reachableVulns &&
(scannedProject.callGraph as CallGraphError).message
) {
if (options.reachableVulns && scannedProject.callGraph?.message) {
const err = scannedProject.callGraph as CallGraphError;
const analyticsError = err.innerError || err;
analytics.add('callGraphError', {
Expand Down

0 comments on commit 1f5c7e9

Please sign in to comment.