Skip to content

Commit

Permalink
compose-go clean volume target to avoid ambiguous comparisons
Browse files Browse the repository at this point in the history
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
  • Loading branch information
ndeloof committed Oct 22, 2024
1 parent 82417bd commit 8139001
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions pkg/compose/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ import (
"fmt"
"io/fs"
"os"
"path"
"path/filepath"
"sort"
"strconv"
Expand Down Expand Up @@ -888,7 +887,6 @@ func buildContainerMountOptions(p types.Project, s types.ServiceConfig, img moby
if m.Type == "volume" {
src = m.Name
}
m.Destination = path.Clean(m.Destination)

if img.Config != nil {
if _, ok := img.Config.Volumes[m.Destination]; ok {
Expand Down Expand Up @@ -1112,8 +1110,6 @@ func buildMount(project types.Project, volume types.ServiceVolumeConfig) (mount.

bind, vol, tmpfs := buildMountOptions(volume)

volume.Target = path.Clean(volume.Target)

if bind != nil {
volume.Type = types.VolumeTypeBind
}
Expand Down

0 comments on commit 8139001

Please sign in to comment.