Skip to content

Commit

Permalink
conan process bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Viji committed Jul 23, 2024
1 parent d934dbb commit 2112f37
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions src/LCT.PackageIdentifier/ConanProcessor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -246,15 +246,14 @@ private void ParsingInputFileForBOM(CommonAppSettings appSettings, ref Bom bom)
AddingIdentifierType(components, "PackageFile");
componentsForBOM.AddRange(components);
}
else if (filepath.EndsWith(FileConstant.CycloneDXFileExtension) && !filepath.EndsWith(FileConstant.SBOMTemplateFileExtension))
else if (filepath.EndsWith(FileConstant.CycloneDXFileExtension)
&& !filepath.EndsWith(FileConstant.SBOMTemplateFileExtension))
{
Logger.Debug($"ParsingInputFileForBOM():Found as CycloneDXFile");
bom = _cycloneDXBomParser.ParseCycloneDXBom(filepath);
CheckValidComponentsForProjectType(bom.Components, appSettings.ProjectType);
GetDetailsforManuallyAddedComp(bom.Components);
componentsForBOM.AddRange(bom.Components);
GetDetailsforManuallyAddedComp(componentsForBOM);// todo: this step should come before
// merging the manually added components
// to discoverd
}
}

Expand All @@ -273,11 +272,13 @@ private void ParsingInputFileForBOM(CommonAppSettings appSettings, ref Bom bom)
bom.Dependencies = dependencies;
}

if (File.Exists(appSettings.CycloneDxSBomTemplatePath) && appSettings.CycloneDxSBomTemplatePath.EndsWith(FileConstant.SBOMTemplateFileExtension))
if (File.Exists(appSettings.CycloneDxSBomTemplatePath)
&& appSettings.CycloneDxSBomTemplatePath.EndsWith(FileConstant.SBOMTemplateFileExtension))
{
//Adding Template Component Details
Bom templateDetails;
templateDetails = ExtractSBOMDetailsFromTemplate(_cycloneDXBomParser.ParseCycloneDXBom(appSettings.CycloneDxSBomTemplatePath));
templateDetails = ExtractSBOMDetailsFromTemplate(
_cycloneDXBomParser.ParseCycloneDXBom(appSettings.CycloneDxSBomTemplatePath));
CheckValidComponentsForProjectType(templateDetails.Components, appSettings.ProjectType);
SbomTemplate.AddComponentDetails(bom.Components, templateDetails);
}
Expand Down

0 comments on commit 2112f37

Please sign in to comment.