Skip to content

Commit 60653bb

Browse files
authored
fix(cli): allow template name length of 32 in template push and create (#11915)
1 parent 86e3325 commit 60653bb

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

cli/templatecreate.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,8 @@ func (r *RootCmd) templateCreate() *clibase.Cmd {
7979
return err
8080
}
8181

82-
if utf8.RuneCountInString(templateName) > 31 {
83-
return xerrors.Errorf("Template name must be less than 32 characters")
82+
if utf8.RuneCountInString(templateName) > 32 {
83+
return xerrors.Errorf("Template name must be no more than 32 characters")
8484
}
8585

8686
_, err = client.TemplateByName(inv.Context(), organization.ID, templateName)

cli/templatepush.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,8 @@ func (r *RootCmd) templatePush() *clibase.Cmd {
5656
return err
5757
}
5858

59-
if utf8.RuneCountInString(name) >= 32 {
60-
return xerrors.Errorf("Template name must be less than 32 characters")
59+
if utf8.RuneCountInString(name) > 32 {
60+
return xerrors.Errorf("Template name must be no more than 32 characters")
6161
}
6262

6363
var createTemplate bool

0 commit comments

Comments
 (0)