From 0042edf994d43a0620509101be263f9fa79eb7e3 Mon Sep 17 00:00:00 2001 From: Christian Goll Date: Wed, 1 Feb 2023 10:56:51 +0100 Subject: [PATCH] correct behavior of profile add to yes flag --- internal/app/wwctl/profile/add/main.go | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/internal/app/wwctl/profile/add/main.go b/internal/app/wwctl/profile/add/main.go index 0260f232..81a2f016 100644 --- a/internal/app/wwctl/profile/add/main.go +++ b/internal/app/wwctl/profile/add/main.go @@ -38,10 +38,6 @@ func CobraRunE(cmd *cobra.Command, args []string) (err error) { if !SetYes { // The checks run twice in the prompt case. // Avoiding putting in a blocking prompt in an API. - err = apiprofile.AddProfile(&set, false) - if err != nil { - return - } _, _, err = apiprofile.ProfileSetParameterCheck(&set, false) if err != nil { return @@ -52,5 +48,5 @@ func CobraRunE(cmd *cobra.Command, args []string) (err error) { return } } - return apiprofile.ProfileSet(&set) + return apiprofile.AddProfile(&set, false) }