Change error message to use original name for clarity, rather than the name after substituting env vars with placeholder.

This commit is contained in:
Preetha Appan 2017-11-17 08:44:18 -06:00
parent fa9f7df16e
commit 1c4375163a
1 changed files with 1 additions and 1 deletions

View File

@ -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 {