forked from toolshed/abra
fix: handle missing ssh keys (pass auth)
This commit is contained in:
@ -43,13 +43,18 @@ func newHetznerCloudVPS(c *cli.Context) error {
|
||||
Location: &hcloud.Location{Name: internal.HetznerCloudLocation},
|
||||
}
|
||||
|
||||
sshKeyIDs := strings.Join(sshKeysRaw, "\n")
|
||||
if sshKeyIDs == "" {
|
||||
sshKeyIDs = "N/A (password auth)"
|
||||
}
|
||||
|
||||
tableColumns := []string{"name", "type", "image", "ssh-keys", "location"}
|
||||
table := formatter.CreateTable(tableColumns)
|
||||
table.Append([]string{
|
||||
internal.HetznerCloudName,
|
||||
internal.HetznerCloudType,
|
||||
internal.HetznerCloudImage,
|
||||
strings.Join(sshKeysRaw, "\n"),
|
||||
sshKeyIDs,
|
||||
internal.HetznerCloudLocation,
|
||||
})
|
||||
table.Render()
|
||||
|
Reference in New Issue
Block a user