snyk-nuget-plugin
Advanced tools
Comparing version 2.7.10 to 2.7.11
@@ -59,2 +59,5 @@ "use strict"; | ||
} | ||
function getRestoredProjectName(publishedProjectDeps, runtimeTarget, projectName) { | ||
return Object.keys(publishedProjectDeps.targets[runtimeTarget]).find((f) => f.startsWith(projectName)); | ||
} | ||
function buildGraph(projectName, projectAssets, publishedProjectDeps, runtimeAssembly) { | ||
@@ -78,5 +81,8 @@ const depGraphBuilder = new dep_graph_1.DepGraphBuilder({ name: 'nuget' }, { | ||
// not applied during publish, only during restore. So we have to rely on the fact that the name is enough. | ||
const restoreProjectName = Object.keys(publishedProjectDeps.targets[runtimeTarget]).find((f) => f.startsWith(projectAssets.project.restore.projectName)); | ||
const restoreProjectName = getRestoredProjectName(publishedProjectDeps, runtimeTarget, projectAssets.project.restore.projectName) || | ||
// Last attempt to find the target using the .csproj filename. | ||
// <PackageId> property overrides most of the naming when restoring, but when publishing, the actual filename is used as the target. | ||
getRestoredProjectName(publishedProjectDeps, runtimeTarget, projectName); | ||
if (!restoreProjectName) { | ||
throw new errors_1.InvalidManifestError(`no project name containing ${projectAssets.project.restore.projectName} found in ${runtimeTarget} object, cannot continue without it`); | ||
throw new errors_1.InvalidManifestError(`no project name containing ${projectAssets.project.restore.projectName} or ${projectName} found in ${runtimeTarget} object, cannot continue without it`); | ||
} | ||
@@ -83,0 +89,0 @@ // Find names and versions of all dependencies of the root package. These are already structured correctly in |
@@ -62,3 +62,3 @@ { | ||
}, | ||
"version": "2.7.10" | ||
"version": "2.7.11" | ||
} |
Sorry, the diff of this file is not supported yet
139378
1888