forked from coop-cloud/abra
fix: support empty ssh keys
This commit is contained in:
parent
960e47437c
commit
e26afb97af
|
@ -23,6 +23,10 @@ func newHetznerCloudVPS(c *cli.Context) error {
|
|||
var sshKeysRaw []string
|
||||
var sshKeys []*hcloud.SSHKey
|
||||
for _, sshKey := range c.StringSlice("hetzner-ssh-keys") {
|
||||
if sshKey == "" {
|
||||
continue
|
||||
}
|
||||
|
||||
sshKey, _, err := client.SSHKey.GetByName(c.Context, sshKey)
|
||||
if err != nil {
|
||||
return err
|
||||
|
@ -109,6 +113,9 @@ func newCapsulVPS(c *cli.Context) error {
|
|||
|
||||
var sshKeys []string
|
||||
for _, sshKey := range c.StringSlice("capsul-ssh-keys") {
|
||||
if sshKey == "" {
|
||||
continue
|
||||
}
|
||||
sshKeys = append(sshKeys, sshKey)
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue