-
Notifications
You must be signed in to change notification settings - Fork 51
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Autodetect compressed tarballs and fix --scan-images flag #37
Conversation
There was a missing piece in the code to plumb the ScanImages option from the cmdline to the spdx object. This commit fixes it. Signed-off-by: Adolfo García Veytia (Puerco) <adolfo.garcia@uservers.net>
/lgtm thanks @puerco |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: kfaseela, puerco The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/lgtm |
@kfaseela: changing LGTM is restricted to collaborators In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
pkg/spdx/implementation.go
Outdated
@@ -86,8 +86,22 @@ func (di *spdxDefaultImplementation) ExtractTarballTmp(tarPath string) (tmpDir s | |||
} | |||
defer f.Close() | |||
|
|||
// Read the first bytes to determine if the file is compressed | |||
var sample [2]byte |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same observations as above ... do we want to put this in a method that can be called from both places?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, yes I'm aware of this. I'm working on a PR to move this functionality to our tar package and once we cut a release there I will refactor all the tar code in the project.
Tar functions will now detect compressed files and open them accordingly without relying on the file extension. Signed-off-by: Adolfo García Veytia (Puerco) <adolfo.garcia@uservers.net>
Thanks a lot @dims I've addressed your comments, PTAL :) |
/lgtm |
What type of PR is this?
/kind bug
What this PR does / why we need it:
This PR fixes two bugs:
Which issue(s) this PR fixes:
Fixes #36
Special notes for your reviewer:
Does this PR introduce a user-facing change?