Files
warewulf/internal/app/wwctl/container/delete/main.go
Jonathon Anderson abd3e21aa0 Fix a typo in container delete confirmation prompt
Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2023-08-08 19:31:02 -06:00

25 lines
549 B
Go

package delete
import (
"fmt"
"github.com/hpcng/warewulf/internal/pkg/api/container"
"github.com/hpcng/warewulf/internal/pkg/api/routes/wwapiv1"
"github.com/hpcng/warewulf/internal/pkg/api/util"
"github.com/spf13/cobra"
)
func CobraRunE(cmd *cobra.Command, args []string) (err error) {
cdp := &wwapiv1.ContainerDeleteParameter{
ContainerNames: args,
}
if !SetYes {
yes := util.ConfirmationPrompt(fmt.Sprintf("Are you sure you want to delete container %s", args))
if !yes {
return
}
}
return container.ContainerDelete(cdp)
}