From 8e5c36968ae6d2dc8da7bab310a47d25ba1f30ac Mon Sep 17 00:00:00 2001 From: Fu Diwei Date: Tue, 3 Jun 2025 23:45:00 +0800 Subject: [PATCH] chore: improve error --- internal/pkg/core/deployer/providers/ssh/ssh.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/internal/pkg/core/deployer/providers/ssh/ssh.go b/internal/pkg/core/deployer/providers/ssh/ssh.go index c68d935b..782b1332 100644 --- a/internal/pkg/core/deployer/providers/ssh/ssh.go +++ b/internal/pkg/core/deployer/providers/ssh/ssh.go @@ -8,6 +8,7 @@ import ( "net" "os" "path/filepath" + "strings" "github.com/pkg/sftp" "github.com/povsister/scp" @@ -313,7 +314,7 @@ func createSshClient(conn net.Conn, host string, port int32, authMethod string, if len(questions) == 1 { return []string{password}, nil } - return nil, fmt.Errorf("unexpected keyboard interactive question: %s", questions[0]) + return nil, fmt.Errorf("unexpected keyboard interactive question [%s]", strings.Join(questions, ", ")) })) }