Include details in error msg

This commit is contained in:
Lane Seppala
2022-06-17 15:15:23 -06:00
parent 79efc0977a
commit 41f80bd8e1
3 changed files with 7 additions and 3 deletions

4
dist/index.js vendored
View File

@@ -263,7 +263,9 @@ function processGoGraph(goModDir, directDependencies, indirectDependencies) {
if (matches.length !== 1) {
throw new Error('assertion failed: expected one package in cache with namespace+name. ' +
'Found: ' +
JSON.stringify(matches));
JSON.stringify(matches) +
'\n' +
`matcher: ${matcher} parentPkg: ${parentPkg} childPkg: ${childPkg}`);
}
// create the dependency relationship
targetPackage.dependsOn(matches[0]);

2
dist/index.js.map vendored

File diff suppressed because one or more lines are too long

View File

@@ -63,7 +63,9 @@ export async function processGoGraph (
throw new Error(
'assertion failed: expected one package in cache with namespace+name. ' +
'Found: ' +
JSON.stringify(matches)
JSON.stringify(matches) +
'\n' +
`matcher: ${matcher} parentPkg: ${parentPkg} childPkg: ${childPkg}`
)
}
// create the dependency relationship