mirror of
https://github.com/coder/coder.git
synced 2026-09-21 20:51:01 +08:00
fix(cli): allow template name length of 32 in template push and create (#11915)
This commit is contained in:
@@ -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)
|
||||
|
||||
+2
-2
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user