summaryrefslogtreecommitdiff
path: root/pkg
diff options
context:
space:
mode:
authorValentin Rothberg <rothberg@redhat.com>2021-02-25 20:15:03 +0100
committerValentin Rothberg <rothberg@redhat.com>2021-03-08 09:21:13 +0100
commit320df838810cbdb0f3dc0e2092f5ed04fc9b6e5d (patch)
treeabde55869279c5d369912c9d5057255e34c73e5a /pkg
parentb7c00f2cc03499d5d385a7aa7e8cd35d0ab994d7 (diff)
downloadpodman-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')
-rw-r--r--pkg/terminal/util.go4
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)