1
0
mirror of https://github.com/containers/buildah.git synced 2025-07-30 04:23:09 +03:00

Stop excessive wrapping

Golang built in functions like os.Create and others print the name of
the file system object when they fail.  Wrapping them a second time
with the file system object, makes the error message look like crap
when reported to the user.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
This commit is contained in:
Daniel J Walsh
2020-10-15 05:16:50 -04:00
parent 7699b6e68c
commit 39f4cfb79d
11 changed files with 74 additions and 69 deletions

View File

@ -419,7 +419,7 @@ func (b *Builder) Commit(ctx context.Context, dest types.ImageReference, options
}
if options.IIDFile != "" {
if err = ioutil.WriteFile(options.IIDFile, []byte(img.ID), 0644); err != nil {
return imgID, nil, "", errors.Wrapf(err, "failed to write image ID to file %q", options.IIDFile)
return imgID, nil, "", err
}
}
}