Skip to content
This repository has been archived by the owner on Sep 9, 2020. It is now read-only.

Fix typeflag reads in tgz.go #896

Merged
merged 1 commit into from
Jan 3, 2019
Merged

Conversation

GuessWhoSamFoo
Copy link
Collaborator

Closes #889

Signed-off-by: GuessWhoSamFoo sfoohei@gmail.com

@coveralls
Copy link

coveralls commented Dec 11, 2018

Pull Request Test Coverage Report for Build 1381

  • 1 of 4 (25.0%) changed or added relevant lines in 2 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.004%) to 70.541%

Changes Missing Coverage Covered Lines Changed/Added Lines %
pkg/util/archive/tgz.go 1 2 50.0%
pkg/registry/github.go 0 2 0.0%
Totals Coverage Status
Change from base Build 1380: -0.004%
Covered Lines: 12581
Relevant Lines: 17835

💛 - Coveralls

@sh0rez
Copy link

sh0rez commented Dec 25, 2018

Can this please be merged? Without this fix one of ksonnet's most important features is only available on osx ..

@kvaps
Copy link

kvaps commented Dec 27, 2018

shipit

@@ -62,6 +65,8 @@ func (t *Tgz) Unarchive(r io.Reader, handler FileHandler) error {
if err = handler(tf); err != nil {
return err
}
default:
return fmt.Errorf("Unknown header typeflag: %v", header.Typeflag)
Copy link
Collaborator

Choose a reason for hiding this comment

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

There's a whole bunch of other valid (but skippable) typeflags - I don't think we need to error out if encountering them. Perhaps remove the default and just handle the types we care about?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Removed the case for TypeDir as well since that was explicitly skipped previously and rebased 👍

Signed-off-by: GuessWhoSamFoo <sfoohei@gmail.com>
@shomron shomron merged commit e0ee29b into ksonnet:master Jan 3, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants