From 0cab1b50f7f0a35019ff8f7567d52fcabca7b4a7 Mon Sep 17 00:00:00 2001 From: hftsin Date: Fri, 18 Nov 2022 17:55:52 +0800 Subject: [PATCH] template: save default config from template --- cmd/template.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/cmd/template.go b/cmd/template.go index 14b3a74c7..264e82c22 100644 --- a/cmd/template.go +++ b/cmd/template.go @@ -63,6 +63,11 @@ var templateCmd = &cobra.Command{ log.Println("configurations template saved") + // save to default config file + if err := configmanager.SaveToFile(cf, config.File()); err != nil { + return fmt.Errorf("error saving default: %w", err) + } + return nil }, }