From 41e888619106ed4368dd9f743e0ca92143e138f6 Mon Sep 17 00:00:00 2001 From: sreya Date: Thu, 30 Jun 2022 18:42:47 +0000 Subject: [PATCH] feat: make 'templates update [name]' optional - If the name is not specified the current working directory name is used or the name specified by "--directory". This reflects 'templates create" behavior. --- cli/templateupdate.go | 13 ++++++--- cli/templateupdate_test.go | 55 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 65 insertions(+), 3 deletions(-) diff --git a/cli/templateupdate.go b/cli/templateupdate.go index fcbba2b122c05..15b2c512fe35b 100644 --- a/cli/templateupdate.go +++ b/cli/templateupdate.go @@ -3,6 +3,7 @@ package cli import ( "fmt" "os" + "path/filepath" "time" "github.com/briandowns/spinner" @@ -24,8 +25,8 @@ func templateUpdate() *cobra.Command { ) cmd := &cobra.Command{ - Use: "update