summaryrefslogtreecommitdiff
path: root/cmd/podman/logout.go
diff options
context:
space:
mode:
authorValentin Rothberg <rothberg@redhat.com>2021-06-24 14:35:10 +0200
committerValentin Rothberg <rothberg@redhat.com>2021-06-25 09:56:21 +0200
commitf95b0995e521e252af52edaf57a31241d364e3d8 (patch)
tree438f53d11703722c6712cf1b84c9fe1efdc884d0 /cmd/podman/logout.go
parentd1f57a07c24a0defc0b0027206fc4454307f64fa (diff)
downloadpodman-f95b0995e521e252af52edaf57a31241d364e3d8.tar.gz
podman-f95b0995e521e252af52edaf57a31241d364e3d8.tar.bz2
podman-f95b0995e521e252af52edaf57a31241d364e3d8.zip
remove `pkg/registries`
Pull the trigger on the `pkg/registries` package which acted as a proxy for `c/image/pkg/sysregistriesv2`. Callers should be using the packages from c/image directly, if needed at all. Also make use of libimage's SystemContext() method which returns a copy of a system context, further reducing the risk of unintentionally altering global data. [NO TESTS NEEDED] Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
Diffstat (limited to 'cmd/podman/logout.go')
-rw-r--r--cmd/podman/logout.go9
1 files changed, 4 insertions, 5 deletions
diff --git a/cmd/podman/logout.go b/cmd/podman/logout.go
index 092ad2610..0ee134635 100644
--- a/cmd/podman/logout.go
+++ b/cmd/podman/logout.go
@@ -8,7 +8,6 @@ import (
"github.com/containers/image/v5/types"
"github.com/containers/podman/v3/cmd/podman/common"
"github.com/containers/podman/v3/cmd/podman/registry"
- "github.com/containers/podman/v3/pkg/registries"
"github.com/spf13/cobra"
)
@@ -48,9 +47,9 @@ func init() {
// Implementation of podman-logout.
func logout(cmd *cobra.Command, args []string) error {
- sysCtx := types.SystemContext{
- AuthFilePath: logoutOptions.AuthFile,
- SystemRegistriesConfPath: registries.SystemRegistriesConfPath(),
+ sysCtx := &types.SystemContext{
+ AuthFilePath: logoutOptions.AuthFile,
}
- return auth.Logout(&sysCtx, &logoutOptions, args)
+ setRegistriesConfPath(sysCtx)
+ return auth.Logout(sysCtx, &logoutOptions, args)
}