Refactor wwctl <node|profile> edit and fix bugs
`wwctl node edit` appears to not be working properly since MergeNode. This refactor, partly towards #918, resolves the issues with `node edit` and updates `profile edit` to match. Signed-off-by: Jonathon Anderson <janderson@ciq.com>
This commit is contained in:
@@ -5,7 +5,7 @@ import (
|
||||
|
||||
"github.com/warewulf/warewulf/internal/pkg/api/image"
|
||||
"github.com/warewulf/warewulf/internal/pkg/api/routes/wwapiv1"
|
||||
apiutil "github.com/warewulf/warewulf/internal/pkg/api/util"
|
||||
"github.com/warewulf/warewulf/internal/pkg/util"
|
||||
|
||||
"github.com/spf13/cobra"
|
||||
)
|
||||
@@ -16,7 +16,7 @@ func CobraRunE(cmd *cobra.Command, args []string) (err error) {
|
||||
}
|
||||
|
||||
if !SetYes {
|
||||
yes := apiutil.ConfirmationPrompt(fmt.Sprintf("Are you sure you want to delete image %s", args))
|
||||
yes := util.Confirm(fmt.Sprintf("Are you sure you want to delete image %s", args))
|
||||
if !yes {
|
||||
return
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user