Skip to content

Commit fd7aa29

Browse files
authored
Tolerate errors in go list output (#1389)
* Minor. * Minor. * Minor.
1 parent 85085f8 commit fd7aa29

3 files changed

Lines changed: 7 additions & 2 deletions

File tree

.changeset/short-dancers-crash.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"go-mod-validator": minor
3+
---
4+
5+
Tolerate errors on the go list output

apps/go-mod-validator/dist/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28519,7 +28519,7 @@ async function getDeps(rootDir, depPrefix) {
2851928519
core.info(`Finding dependencies in ${goModFilePath}`);
2852028520
try {
2852128521
const dir = (0, import_path.dirname)(goModFilePath);
28522-
const output = (0, import_child_process.execSync)("go list -json -m all", {
28522+
const output = (0, import_child_process.execSync)("go list -json -e -m all", {
2852328523
encoding: "utf-8",
2852428524
cwd: dir
2852528525
});

apps/go-mod-validator/src/deps.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ export async function getDeps(
189189
core.info(`Finding dependencies in ${goModFilePath}`);
190190
try {
191191
const dir = dirname(goModFilePath);
192-
const output = execSync("go list -json -m all", {
192+
const output = execSync("go list -json -e -m all", {
193193
encoding: "utf-8",
194194
cwd: dir,
195195
});

0 commit comments

Comments
 (0)