Explorar o código

Merge pull request #27985 from muayyad-alsadi/17734-better-message-for-host-volumes

fixes #17734, clear message for host volumes not starting with /
Victor Vieux %!s(int64=8) %!d(string=hai) anos
pai
achega
b06dc994f6
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      volume/local/local.go

+ 1 - 1
volume/local/local.go

@@ -269,7 +269,7 @@ func (r *Root) validateName(name string) error {
 		return validationError{fmt.Errorf("volume name is too short, names should be at least two alphanumeric characters")}
 	}
 	if !volumeNameRegex.MatchString(name) {
-		return validationError{fmt.Errorf("%q includes invalid characters for a local volume name, only %q are allowed", name, utils.RestrictedNameChars)}
+		return validationError{fmt.Errorf("%q includes invalid characters for a local volume name, only %q are allowed. If you intented to pass a host directory, use absolute path.", name, utils.RestrictedNameChars)}
 	}
 	return nil
 }