Make sure sshkey is not nil
This commit is contained in:
parent
74abd80c4f
commit
8184fcb99a
|
@ -43,6 +43,10 @@ func (s *stepCreateServer) Run(ctx context.Context, state multistep.StateBag) mu
|
||||||
state.Put("error", fmt.Errorf("Error fetching SSH key: %s", err))
|
state.Put("error", fmt.Errorf("Error fetching SSH key: %s", err))
|
||||||
return multistep.ActionHalt
|
return multistep.ActionHalt
|
||||||
}
|
}
|
||||||
|
if sshKey == nil {
|
||||||
|
state.Put("error", fmt.Errorf("Could not find key: %s", k))
|
||||||
|
return multistep.ActionHalt
|
||||||
|
}
|
||||||
sshKeys = append(sshKeys, sshKey)
|
sshKeys = append(sshKeys, sshKey)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue