diff --git a/README.md b/README.md index 4b6c0f6e08..b4452831e3 100644 --- a/README.md +++ b/README.md @@ -1183,7 +1183,7 @@ $ scw inspect myserver | jq '.[0].public_ip.address' ### master (unreleased) -* No entry +* `scw login` don't ask to upload ssh key when there is no keys View full [commits list](https://github.com/scaleway/scaleway-cli/compare/v1.8.0...master) diff --git a/pkg/commands/login.go b/pkg/commands/login.go index 473cc80b67..d3ea1c42c1 100644 --- a/pkg/commands/login.go +++ b/pkg/commands/login.go @@ -32,7 +32,6 @@ type LoginArgs struct { // selectKey allows to choice a key in ~/.ssh func selectKey(args *LoginArgs) error { - fmt.Println("Do you want to upload an SSH key ?") home, err := config.GetHomeDir() if err != nil { return err @@ -52,6 +51,7 @@ func selectKey(args *LoginArgs) error { if len(pubs) == 0 { return nil } + fmt.Println("Do you want to upload an SSH key ?") fmt.Println("[0] I don't want to upload a key !") for i := range pubs { fmt.Printf("[%d] %s\n", i+1, pubs[i])