Change error message to use original name for clarity, rather than the name after substituting env vars with placeholder.
This commit is contained in:
parent
fa9f7df16e
commit
1c4375163a
|
@ -3079,7 +3079,7 @@ func (s *Service) Validate() error {
|
||||||
serviceNameStripped := args.ReplaceEnvWithPlaceHolder(s.Name, "ENV-VAR")
|
serviceNameStripped := args.ReplaceEnvWithPlaceHolder(s.Name, "ENV-VAR")
|
||||||
|
|
||||||
if err := s.ValidateName(serviceNameStripped); err != nil {
|
if err := s.ValidateName(serviceNameStripped); err != nil {
|
||||||
mErr.Errors = append(mErr.Errors, err)
|
mErr.Errors = append(mErr.Errors, fmt.Errorf("service name must be valid per RFC 1123 and can contain only alphanumeric characters or dashes: %q", s.Name))
|
||||||
}
|
}
|
||||||
|
|
||||||
switch s.AddressMode {
|
switch s.AddressMode {
|
||||||
|
|
Loading…
Reference in New Issue