fix(configtest,scan): support SSH config file (#1388)

* fix(configtest,scan): support SSH config file

* chore(subcmds): remove askKeyPassword flag
This commit is contained in:
MaineK00n
2022-02-12 21:50:56 +09:00
committed by GitHub
parent e5855922c1
commit 07335617d3
11 changed files with 99 additions and 101 deletions

View File

@@ -1,29 +1,12 @@
package subcmds
import (
"fmt"
"os"
"path/filepath"
"github.com/howeyc/gopass"
homedir "github.com/mitchellh/go-homedir"
"golang.org/x/xerrors"
)
func getPasswd(prompt string) (string, error) {
for {
fmt.Print(prompt)
pass, err := gopass.GetPasswdMasked()
if err != nil {
return "", xerrors.New("Failed to read a password")
}
if 0 < len(pass) {
return string(pass), nil
}
}
}
func mkdirDotVuls() error {
home, err := homedir.Dir()
if err != nil {