fix: support empty ssh keys
This commit is contained in:
		@ -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)
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user