mirror of
https://github.com/wagoodman/dive
synced 2024-06-02 20:22:13 +02:00
fix validation errors
This commit is contained in:
parent
fcb5ec01ef
commit
fd3459eb02
|
@ -57,7 +57,7 @@ func initCli() {
|
|||
|
||||
for _, key := range []string{"lowestEfficiency", "highestWastedBytes", "highestUserWastedPercent"} {
|
||||
if err := ciConfig.BindPFlag(fmt.Sprintf("rules.%s", key), rootCmd.Flags().Lookup(key)); err != nil {
|
||||
log.Fatal("Unable to bind '%s' flag:", key, err)
|
||||
log.Fatalf("Unable to bind '%s' flag: %v", key, err)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -84,6 +84,9 @@ func (r *resolver) resolveFromDockerArchive(id string) (*image.Image, error) {
|
|||
defer os.Remove(path)
|
||||
|
||||
file, err := os.Open(path)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
defer file.Close()
|
||||
|
||||
img, err := docker.NewImageArchive(ioutil.NopCloser(bufio.NewReader(file)))
|
||||
|
|
Loading…
Reference in a new issue