mirror of
https://gitea.com/Lydanne/buildx.git
synced 2025-07-09 21:17:09 +08:00
bumpo compose-go to v2.1.0
Signed-off-by: Guillaume Lours <705411+glours@users.noreply.github.com>
This commit is contained in:
5
vendor/github.com/compose-spec/compose-go/v2/transform/volume.go
generated
vendored
5
vendor/github.com/compose-spec/compose-go/v2/transform/volume.go
generated
vendored
@ -24,13 +24,16 @@ import (
|
||||
"github.com/compose-spec/compose-go/v2/tree"
|
||||
)
|
||||
|
||||
func transformVolumeMount(data any, p tree.Path) (any, error) {
|
||||
func transformVolumeMount(data any, p tree.Path, ignoreParseError bool) (any, error) {
|
||||
switch v := data.(type) {
|
||||
case map[string]any:
|
||||
return v, nil
|
||||
case string:
|
||||
volume, err := format.ParseVolume(v) // TODO(ndeloof) ParseVolume should not rely on types and return map[string]
|
||||
if err != nil {
|
||||
if ignoreParseError {
|
||||
return v, nil
|
||||
}
|
||||
return nil, err
|
||||
}
|
||||
volume.Target = cleanTarget(volume.Target)
|
||||
|
Reference in New Issue
Block a user