Podman adds an Error: to every error message. So starting an error
message with "error" ends up being reported to the user as
Error: error ...
This patch removes the stutter.
Also ioutil.ReadFile errors report the Path, so wrapping the err message
with the path causes a stutter.
Signed-off-by: Daniel J Walsh dwalsh@redhat.com
[NO NEW TESTS NEEDED]
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
We now use the golang error wrapping format specifier `%w` instead of
the deprecated github.com/pkg/errors package.
Signed-off-by: Sascha Grunert <sgrunert@redhat.com>
Podman is growing the support to mount and umount storage containers.
This patch will help maintain buildahs internel state and will return
the correct information to the user if they check if buildah containers
are mounted.
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
Make sure that when attempting to diagnose an error, if we encounter an
error during the diagnostic attempt, we return the original error rather
than the error encountered in trying to diagnose it. Log that one.
Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
Closes: #1072
Approved by: rhatdan
buildah mount should work like the mount command and list all mount points
when no options are specified.
Need buildah umount to remove mount point from the database when a mount point
is umounted.
Also remove Mounts field from the builder object. We only support a single mount
point so no reason for this field any longer.
Signed-off-by: Dan Walsh <dwalsh@redhat.com>
Closes: #124
Approved by: nalind
Pull most of the core logic from the CLI into a package that should be
easier to consume as a library. Add a "config" command that updates the
builder object's configuration.
Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>