mirror of
https://gitea.com/Lydanne/buildx.git
synced 2025-07-12 14:37:08 +08:00
Bump compose-go v2.1.5
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
This commit is contained in:
30
vendor/github.com/compose-spec/compose-go/v2/paths/resolve.go
generated
vendored
30
vendor/github.com/compose-spec/compose-go/v2/paths/resolve.go
generated
vendored
@ -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) {
|
||||
|
Reference in New Issue
Block a user