Bump github.com/containers/common from 0.36.0 to 0.37.0

Bumps [github.com/containers/common](https://github.com/containers/common) from 0.36.0 to 0.37.0.
- [Release notes](https://github.com/containers/common/releases)
- [Commits](https://github.com/containers/common/compare/v0.36.0...v0.37.0)

Signed-off-by: dependabot[bot] <support@github.com>
This commit is contained in:
dependabot[bot]
2021-04-22 07:59:24 +00:00
committed by GitHub
parent 979f047d73
commit 8ebafbde34
15 changed files with 74 additions and 66 deletions

View File

@ -138,11 +138,11 @@ func isValidDeviceMode(mode string) bool {
// ValidateVolumeHostDir validates a volume mount's source directory
func ValidateVolumeHostDir(hostDir string) error {
if hostDir == "" {
return errors.Errorf("host directory cannot be empty")
return errors.New("host directory cannot be empty")
}
if filepath.IsAbs(hostDir) {
if _, err := os.Stat(hostDir); err != nil {
return errors.Wrapf(err, "error checking path %q", hostDir)
return err
}
}
// If hostDir is not an absolute path, that means the user wants to create a
@ -153,7 +153,7 @@ func ValidateVolumeHostDir(hostDir string) error {
// ValidateVolumeCtrDir validates a volume mount's destination directory.
func ValidateVolumeCtrDir(ctrDir string) error {
if ctrDir == "" {
return errors.Errorf("container directory cannot be empty")
return errors.New("container directory cannot be empty")
}
if !filepath.IsAbs(ctrDir) {
return errors.Errorf("invalid container path %q, must be an absolute path", ctrDir)