snyk-go-plugin
Advanced tools
Comparing version 1.11.0 to 1.11.1
@@ -10,2 +10,3 @@ "use strict"; | ||
const subProcess = require("./sub-process"); | ||
const custom_error_1 = require("./errors/custom-error"); | ||
const snyk_go_parser_1 = require("snyk-go-parser"); | ||
@@ -297,3 +298,11 @@ const debug = debugLib('snyk-go-plugin'); | ||
}; | ||
const goDepsOutput = yield subProcess.execute('go list', ['-json', '-deps', './...'], { cwd: root }); | ||
let goDepsOutput; | ||
try { | ||
goDepsOutput = yield subProcess.execute('go list', ['-json', '-deps', './...'], { cwd: root }); | ||
} | ||
catch (err) { | ||
const userError = new custom_error_1.CustomError(err); | ||
userError.userMessage = "'go list -json -deps ./...' command failed with error: " + userError.message; | ||
throw userError; | ||
} | ||
if (goDepsOutput.includes('matched no packages')) { | ||
@@ -300,0 +309,0 @@ return depTree; |
@@ -9,2 +9,3 @@ import * as fs from 'fs'; | ||
import * as subProcess from './sub-process'; | ||
import { CustomError } from './errors/custom-error'; | ||
@@ -463,3 +464,13 @@ import { | ||
}; | ||
const goDepsOutput = await subProcess.execute('go list', ['-json', '-deps', './...'], { cwd: root } ); | ||
let goDepsOutput: string; | ||
try { | ||
goDepsOutput = await subProcess.execute('go list', ['-json', '-deps', './...'], { cwd: root } ); | ||
} catch (err) { | ||
const userError = new CustomError(err); | ||
userError.userMessage = "'go list -json -deps ./...' command failed with error: " + userError.message; | ||
throw userError; | ||
} | ||
if (goDepsOutput.includes('matched no packages')) { | ||
@@ -466,0 +477,0 @@ return depTree; |
@@ -43,3 +43,3 @@ { | ||
}, | ||
"version": "1.11.0" | ||
"version": "1.11.1" | ||
} |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
76123
27
1014