diff --git a/internal/app/wwctl/node/delete/main.go b/internal/app/wwctl/node/delete/main.go index b5a58308..0cf23218 100644 --- a/internal/app/wwctl/node/delete/main.go +++ b/internal/app/wwctl/node/delete/main.go @@ -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