Skip to content

Commit

Permalink
fixes moby#17734, clear message for host volumes not starting with /
Browse files Browse the repository at this point in the history
Signed-off-by: Muayyad Alsadi <[email protected]>
  • Loading branch information
muayyad-alsadi committed Nov 2, 2016
1 parent 6740bc5 commit a8180ee
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion volume/local/local.go
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,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 host directory use absolute path starting with /", name, utils.RestrictedNameChars)}
}
return nil
}
Expand Down

0 comments on commit a8180ee

Please sign in to comment.