From 276fb69179caa5787bbfeda3f20d458d89a6bb4f Mon Sep 17 00:00:00 2001 From: itschip Date: Sun, 12 Nov 2023 02:59:02 +0100 Subject: [PATCH] fix(cmd): lint check --- cmd/create.go | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/cmd/create.go b/cmd/create.go index 02c5fbc7..2ae7d204 100644 --- a/cmd/create.go +++ b/cmd/create.go @@ -98,7 +98,11 @@ func createNamePrompt(cmd *cobra.Command, project *program.Project, options *ste project.ExitCLI(tprogram) project.ProjectName = options.ProjectName.Output - cmd.Flag("name").Value.Set(project.ProjectName) + err := cmd.Flag("name").Value.Set(project.ProjectName) + if err != nil { + log.Printf("Problem setting project name: %v", err) + cobra.CheckErr(err) + } } func createFrameworkPrompt(cmd *cobra.Command, project *program.Project, options *steps.Options) { @@ -117,5 +121,9 @@ func createFrameworkPrompt(cmd *cobra.Command, project *program.Project, options } project.ProjectType = strings.ToLower(options.ProjectType) - cmd.Flag("framework").Value.Set(project.ProjectType) + err := cmd.Flag("framework").Value.Set(project.ProjectType) + if err != nil { + log.Printf("Problem setting project framework: %v", err) + cobra.CheckErr(err) + } }