From d7c0f968ca60994306c8c76cd8e4e0a677fe9ada Mon Sep 17 00:00:00 2001 From: Qi Wang Date: Fri, 25 Oct 2019 21:16:37 -0400 Subject: fix bug check nonexist authfile Use GetDefaultAuthFile() from buildah. For podman command(except login), if authfile does not exist returns error. close #4328 Signed-off-by: Qi Wang --- cmd/podman/common.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'cmd/podman/common.go') diff --git a/cmd/podman/common.go b/cmd/podman/common.go index 37511641b..4cdcbed44 100644 --- a/cmd/podman/common.go +++ b/cmd/podman/common.go @@ -7,8 +7,8 @@ import ( "strings" "github.com/containers/buildah" + buildahcli "github.com/containers/buildah/pkg/cli" "github.com/containers/libpod/cmd/podman/cliconfig" - "github.com/containers/libpod/cmd/podman/shared" "github.com/containers/libpod/libpod/define" "github.com/containers/libpod/pkg/rootless" "github.com/containers/libpod/pkg/sysinfo" @@ -112,7 +112,7 @@ func getCreateFlags(c *cliconfig.PodmanCommand) { "Attach to STDIN, STDOUT or STDERR (default [])", ) createFlags.String( - "authfile", shared.GetAuthFile(""), + "authfile", buildahcli.GetDefaultAuthFile(), "Path of the authentication file. Use REGISTRY_AUTH_FILE environment variable to override", ) createFlags.String( -- cgit v1.2.3-54-g00ecf