diff options
author | Valentin Rothberg <rothberg@redhat.com> | 2021-02-25 20:15:03 +0100 |
---|---|---|
committer | Valentin Rothberg <rothberg@redhat.com> | 2021-03-08 09:21:13 +0100 |
commit | 320df838810cbdb0f3dc0e2092f5ed04fc9b6e5d (patch) | |
tree | abde55869279c5d369912c9d5057255e34c73e5a /pkg/terminal | |
parent | b7c00f2cc03499d5d385a7aa7e8cd35d0ab994d7 (diff) | |
download | podman-320df838810cbdb0f3dc0e2092f5ed04fc9b6e5d.tar.gz podman-320df838810cbdb0f3dc0e2092f5ed04fc9b6e5d.tar.bz2 podman-320df838810cbdb0f3dc0e2092f5ed04fc9b6e5d.zip |
pkg/terminal: use c/storage/pkg/homedir
This also prunes the dependency on `k8s.io/client-go`.
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
Diffstat (limited to 'pkg/terminal')
-rw-r--r-- | pkg/terminal/util.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/pkg/terminal/util.go b/pkg/terminal/util.go index 231b47974..04e12f6b3 100644 --- a/pkg/terminal/util.go +++ b/pkg/terminal/util.go @@ -10,11 +10,11 @@ import ( "path/filepath" "sync" + "github.com/containers/storage/pkg/homedir" "github.com/sirupsen/logrus" "golang.org/x/crypto/ssh" "golang.org/x/crypto/ssh/knownhosts" "golang.org/x/crypto/ssh/terminal" - "k8s.io/client-go/util/homedir" ) var ( @@ -105,7 +105,7 @@ func ReadLogin() []byte { func HostKey(host string) ssh.PublicKey { // parse OpenSSH known_hosts file // ssh or use ssh-keyscan to get initial key - knownHosts := filepath.Join(homedir.HomeDir(), ".ssh", "known_hosts") + knownHosts := filepath.Join(homedir.Get(), ".ssh", "known_hosts") fd, err := os.Open(knownHosts) if err != nil { logrus.Error(err) |