Skip to content
Open
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
2 changes: 1 addition & 1 deletion pkg/compose/pull.go
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ func (s *composeService) pullServiceImage(ctx context.Context, service types.Ser
return "", nil
}

// check if has error and the service has a build section
// check if it has an error and the service has a build section
// then the status should be warning instead of error
if err != nil && service.Build != nil {
s.events.On(api.Resource{
Expand Down
2 changes: 1 addition & 1 deletion pkg/compose/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ func (s *composeService) RunOneOffContainer(ctx context.Context, project *types.
return 0, err
}

// remove cancellable context signal handler so we can forward signals to container without compose from exiting
// remove cancellable context signal handler so we can forward signals to container without compose exiting
signal.Reset()

sigc := make(chan os.Signal, 128)
Expand Down
4 changes: 2 additions & 2 deletions pkg/compose/watch.go
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ func (s *composeService) watch(ctx context.Context, project *types.Project, opti
}

if shouldInitialSync && isSync(trigger) {
// Need to check initial files are in container that are meant to be synced from watch action
// Need to check that initial files meant to be synced from the watch action are in the container
err := s.initialSync(ctx, project, service, trigger, syncer)
if err != nil {
return nil, err
Expand Down Expand Up @@ -761,7 +761,7 @@ func (s *composeService) initialSync(ctx context.Context, project *types.Project
return syncer.Sync(ctx, service.Name, pathsToCopy)
}

// Syncs files from develop.watch.path if thy have been modified after the image has been created
// Syncs files from develop.watch.path if they have been modified after the image has been created
//
//nolint:gocyclo
func (s *composeService) initialSyncFiles(ctx context.Context, project *types.Project, service types.ServiceConfig, trigger types.Trigger, ignore watch.PathMatcher) ([]*sync.PathMapping, error) {
Expand Down
6 changes: 3 additions & 3 deletions pkg/remote/oci.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ const (
)

// validatePathInBase ensures a file path is contained within the base directory,
// as OCI artifacts resources must all live within the same folder.
// as OCI artifact resources must all live within the same folder.
func validatePathInBase(base, unsafePath string) error {
// Reject paths with path separators regardless of OS
if strings.ContainsAny(unsafePath, "\\/") {
Expand Down Expand Up @@ -149,7 +149,7 @@ func (g *ociRemoteLoader) Load(ctx context.Context, path string) (string, error)
local = filepath.Join(cache, descriptor.Digest.Hex())
if _, err = os.Stat(local); os.IsNotExist(err) {

// a Compose application bundle is published as image index
// a Compose application bundle is published as an image index
if images.IsIndexType(descriptor.MediaType) {
var index spec.Index
err = json.Unmarshal(content, &index)
Expand Down Expand Up @@ -184,7 +184,7 @@ func (g *ociRemoteLoader) Load(ctx context.Context, path string) (string, error)

err = g.pullComposeFiles(ctx, local, manifest, ref, resolver)
if err != nil {
// we need to clean up the directory to be sure we won't let empty files present
// we need to clean up the directory to be sure we won't leave empty files behind
_ = os.RemoveAll(local)
return "", err
}
Expand Down