From 60653bbacb3bcb0a10d37ff36ccacdfedd996654 Mon Sep 17 00:00:00 2001 From: Mathias Fredriksson Date: Tue, 30 Jan 2024 12:47:10 +0200 Subject: [PATCH] fix(cli): allow template name length of 32 in template push and create (#11915) --- cli/templatecreate.go | 4 ++-- cli/templatepush.go | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/cli/templatecreate.go b/cli/templatecreate.go index 4cc92e95b8..5a03ff1267 100644 --- a/cli/templatecreate.go +++ b/cli/templatecreate.go @@ -79,8 +79,8 @@ func (r *RootCmd) templateCreate() *clibase.Cmd { return err } - if utf8.RuneCountInString(templateName) > 31 { - return xerrors.Errorf("Template name must be less than 32 characters") + if utf8.RuneCountInString(templateName) > 32 { + return xerrors.Errorf("Template name must be no more than 32 characters") } _, err = client.TemplateByName(inv.Context(), organization.ID, templateName) diff --git a/cli/templatepush.go b/cli/templatepush.go index c1099a67bd..e0e1e689c4 100644 --- a/cli/templatepush.go +++ b/cli/templatepush.go @@ -56,8 +56,8 @@ func (r *RootCmd) templatePush() *clibase.Cmd { return err } - if utf8.RuneCountInString(name) >= 32 { - return xerrors.Errorf("Template name must be less than 32 characters") + if utf8.RuneCountInString(name) > 32 { + return xerrors.Errorf("Template name must be no more than 32 characters") } var createTemplate bool