do not confirm deleting zero nodes

close #603

Signed-off-by: Christian Goll <cgoll@suse.de>
This commit is contained in:
Christian Goll
2022-12-22 14:48:58 +01:00
parent 3829cb413e
commit 0e6223b6f8

View File

@@ -25,6 +25,9 @@ func CobraRunE(cmd *cobra.Command, args []string) (err error) {
if err != nil {
return
}
if len(nodeList) == 0 {
return
}
yes := util.ConfirmationPrompt(fmt.Sprintf("Are you sure you want to delete %d nodes(s)", len(nodeList)))
if !yes {
return