Skip to content

Conversation

@idunbarh
Copy link
Member

Description

This PR fixes three issues.

  • Recursive fetching of SBOMs was not occurring be unless an output file was specified
  • The recursive output files had an exta "." in the name
  • When recursive fetching and a output file was specified, the recursive output files were empty

Fixes #133

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

Ran ...

bomctl fetch https://raw.githubusercontent.com/bomctl/bomctl-playground/main/examples/bomctl-container-image/bomctl_bomctl_v0.3.0.cdx.json

... with and without an output file.

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules
  • I have checked my code and corrected any misspellings

Signed-off-by: Ian Dunbar-Hall <ian.dunbar-hall@lmco.com>
Signed-off-by: Ian Dunbar-Hall <ian.dunbar-hall@lmco.com>
@idunbarh idunbarh requested a review from a team as a code owner August 16, 2024 04:31
@idunbarh idunbarh added the bug Something isn't working label Aug 16, 2024
@idunbarh idunbarh added this to the Minimum Viable Project milestone Aug 16, 2024
Copy link
Contributor

@jhoward-lm jhoward-lm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor comments about reverting to using opts.OutputFile instead of additional outputFile *os.File parameters in multiple places, but otherwise looks great!

@jhoward-lm jhoward-lm changed the title Fix recursive fetching and outputting of recursive files fix: recursive fetching and outputting of recursive files Aug 16, 2024
@idunbarh idunbarh requested a review from jhoward-lm August 16, 2024 17:07
Signed-off-by: Ian Dunbar-Hall <ian.dunbar-hall@lmco.com>
@idunbarh idunbarh requested review from ashearin and eddiezane August 17, 2024 01:05
@idunbarh idunbarh merged commit 4f396cb into main Aug 18, 2024
@idunbarh idunbarh deleted the 133_fetch_recursive branch August 18, 2024 18:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

bomctl fetch not recursively fetch

7 participants