Skip to content

Commit da10dac

Browse files
committed
fix: Removes negative lookahead from regex
1 parent 92765ea commit da10dac

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pkg/devspace/configure/image.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ func (m *manager) AddImage(imageName, image, projectNamespace, dockerfile string
174174
registryHostname, err = m.log.Question(&survey.QuestionOptions{
175175
Question: "Please provide the registry hostname without the image path (e.g. gcr.io, ghcr.io, ecr.io)",
176176
DefaultValue: "gcr.io",
177-
ValidationRegexPattern: "^(?!-)[a-z0-9-]{1,63}(\\.[a-z0-9-]{1,63})*$",
177+
ValidationRegexPattern: "^[a-z0-9][a-z0-9-]{0,62}(\\.[a-z0-9-]{1,63})*$",
178178
ValidationMessage: "Error parsing registry hostname: must only include letters, digits, dots and hyphens and cannot exceed 253 characters.",
179179
})
180180
if err != nil {

0 commit comments

Comments
 (0)