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…
x
Reference in New Issue
Block a user