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:
parent
294e2951f0
commit
af5157d38e
@ -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
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user