1
0
mirror of https://github.com/drone/drone-cli.git synced 2024-11-26 06:07:05 +01:00

Integrate force flag to server destroy

This commit is contained in:
Thomas Boerger 2019-08-09 10:33:57 +02:00
parent 294e2951f0
commit af5157d38e
No known key found for this signature in database
GPG Key ID: 09745AFF9D63C79B

@ -21,6 +21,10 @@ var serverDestroyCmd = cli.Command{
Usage: "format output", Usage: "format output",
Value: tmplServerDestroy, Value: tmplServerDestroy,
}, },
cli.BoolFlag{
Name: "force",
Usage: "force destroy",
},
}, },
} }
@ -35,7 +39,7 @@ func serverDestroy(c *cli.Context) error {
return fmt.Errorf("Missing or invalid server name") return fmt.Errorf("Missing or invalid server name")
} }
err = client.ServerDelete(name) err = client.ServerDelete(name, c.Bool("foorce"))
if err != nil { if err != nil {
return err return err
} }