Bump compose-go v2.1.5

Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
This commit is contained in:
Nicolas De Loof
2024-07-23 17:06:43 +02:00
parent aa35c954f3
commit c4d3011a98
9 changed files with 80 additions and 83 deletions

View File

@ -116,24 +116,30 @@ func (r *relativePathsResolver) absPath(value any) (any, error) {
}
return v, nil
}
return nil, fmt.Errorf("unexpected type %T", value)
}
func (r *relativePathsResolver) absVolumeMount(a any) (any, error) {
vol := a.(map[string]any)
if vol["type"] != types.VolumeTypeBind {
switch vol := a.(type) {
case map[string]any:
if vol["type"] != types.VolumeTypeBind {
return vol, nil
}
src, ok := vol["source"]
if !ok {
return nil, errors.New(`invalid mount config for type "bind": field Source must not be empty`)
}
abs, err := r.maybeUnixPath(src.(string))
if err != nil {
return nil, err
}
vol["source"] = abs
return vol, nil
default:
// not using canonical format, skip
return a, nil
}
src, ok := vol["source"]
if !ok {
return nil, errors.New(`invalid mount config for type "bind": field Source must not be empty`)
}
abs, err := r.maybeUnixPath(src.(string))
if err != nil {
return nil, err
}
vol["source"] = abs
return vol, nil
}
func (r *relativePathsResolver) volumeDriverOpts(a any) (any, error) {