Skip to content

Commit 98c7c43

Browse files
committed
Merge pull request #310 from QuentinPerez/login
login: Don't print message when we are no keys
2 parents 33a25a4 + f694527 commit 98c7c43

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1183,7 +1183,7 @@ $ scw inspect myserver | jq '.[0].public_ip.address'
11831183

11841184
### master (unreleased)
11851185

1186-
* No entry
1186+
* `scw login` don't ask to upload ssh key when there is no keys
11871187

11881188
View full [commits list](https://github.com/scaleway/scaleway-cli/compare/v1.8.0...master)
11891189

pkg/commands/login.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ type LoginArgs struct {
3232

3333
// selectKey allows to choice a key in ~/.ssh
3434
func selectKey(args *LoginArgs) error {
35-
fmt.Println("Do you want to upload an SSH key ?")
3635
home, err := config.GetHomeDir()
3736
if err != nil {
3837
return err
@@ -52,6 +51,7 @@ func selectKey(args *LoginArgs) error {
5251
if len(pubs) == 0 {
5352
return nil
5453
}
54+
fmt.Println("Do you want to upload an SSH key ?")
5555
fmt.Println("[0] I don't want to upload a key !")
5656
for i := range pubs {
5757
fmt.Printf("[%d] %s\n", i+1, pubs[i])

0 commit comments

Comments
 (0)