fix: handle inputs for server new correctly

This commit is contained in:
2021-10-25 08:23:29 +02:00
parent 9a0e12258a
commit 147687d7ce
2 changed files with 36 additions and 14 deletions

View File

@ -22,7 +22,7 @@ func newHetznerCloudVPS(c *cli.Context) error {
var sshKeysRaw []string
var sshKeys []*hcloud.SSHKey
for _, sshKey := range c.StringSlice("ssh-keys") {
for _, sshKey := range c.StringSlice("hetzner-ssh-keys") {
sshKey, _, err := client.SSHKey.GetByName(c.Context, sshKey)
if err != nil {
return err
@ -52,7 +52,7 @@ func newHetznerCloudVPS(c *cli.Context) error {
response := false
prompt := &survey.Confirm{
Message: "continue with capsul creation?",
Message: "continue with hetzner cloud VPS creation?",
}
if err := survey.AskOne(prompt, &response); err != nil {
@ -160,6 +160,12 @@ The following providers are supported:
You may invoke this command in "wizard" mode and be prompted for input:
abra record new
API tokens are read from the environment if specified, e.g.
export HCLOUD_TOKEN=...
Where "$provider_TOKEN" is the expected env var format.
`,
ArgsUsage: "<provider>",
Flags: []cli.Flag{