Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions internal/sync/shared.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ package sync

import (
"context"

"github.com/compose-spec/compose-go/v2/types"
)

// PathMapping contains the Compose service and modified host system path.
Expand All @@ -38,5 +36,5 @@ type PathMapping struct {
}

type Syncer interface {
Sync(ctx context.Context, service types.ServiceConfig, paths []PathMapping) error
Sync(ctx context.Context, service string, paths []*PathMapping) error
}
7 changes: 3 additions & 4 deletions internal/sync/tar.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ import (

"github.com/hashicorp/go-multierror"

"github.com/compose-spec/compose-go/v2/types"
moby "github.com/docker/docker/api/types"
"github.com/docker/docker/pkg/archive"
)
Expand Down Expand Up @@ -65,8 +64,8 @@ func NewTar(projectName string, client LowLevelClient) *Tar {
}
}

func (t *Tar) Sync(ctx context.Context, service types.ServiceConfig, paths []PathMapping) error {
containers, err := t.client.ContainersForService(ctx, t.projectName, service.Name)
func (t *Tar) Sync(ctx context.Context, service string, paths []*PathMapping) error {
containers, err := t.client.ContainersForService(ctx, t.projectName, service)
if err != nil {
return err
}
Expand All @@ -77,7 +76,7 @@ func (t *Tar) Sync(ctx context.Context, service types.ServiceConfig, paths []Pat
if _, err := os.Stat(p.HostPath); err != nil && errors.Is(err, fs.ErrNotExist) {
pathsToDelete = append(pathsToDelete, p.ContainerPath)
} else {
pathsToCopy = append(pathsToCopy, p)
pathsToCopy = append(pathsToCopy, *p)
}
}

Expand Down
Loading
Loading