Skip to content
This repository was archived by the owner on Mar 27, 2024. It is now read-only.

Correctly handle case where no image source is parsed #215

Merged
merged 1 commit into from
Apr 3, 2018

Conversation

nkubala
Copy link
Contributor

@nkubala nkubala commented Apr 2, 2018

This fixes a panic that happens most commonly when a docker ID is passed instead of an image path.

@nkubala nkubala requested a review from dlorenc April 2, 2018 20:37
@@ -57,7 +57,9 @@ func (p *DaemonPrepper) GetFileSystem() (string, error) {
}

src, err := ref.NewImageSource(nil)
defer src.Close()
Copy link
Contributor

Choose a reason for hiding this comment

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

I think you can get the same thing by skipping the if nil check and moving this to under the if err check.

@nkubala nkubala merged commit 4b4b0cb into GoogleContainerTools:master Apr 3, 2018
@nkubala nkubala deleted the no_docker_id branch April 3, 2018 21:16
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.

2 participants