Skip to content

Commit

Permalink
Fix lint
Browse files Browse the repository at this point in the history
Signed-off-by: Joana Hrotko <[email protected]>
  • Loading branch information
jhrotko committed Aug 6, 2024
1 parent 768aca8 commit fe051f9
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions pkg/compose/watch.go
Original file line number Diff line number Diff line change
Expand Up @@ -608,6 +608,8 @@ func (s *composeService) initialSync(ctx context.Context, project *types.Project

// walks develop.watch.path and checks which files should be copied inside the container
// ignores develop.watch.ignore, Dockerfile, compose files, bind mounted paths and .git
//
//nolint:gocyclo
func (s *composeService) initialSyncFiles(ctx context.Context, project *types.Project, service types.ServiceConfig, trigger types.Trigger, ignore watch.PathMatcher) ([]sync.PathMapping, error) {
fi, err := os.Stat(trigger.Path)
if err != nil {
Expand Down Expand Up @@ -640,7 +642,6 @@ func (s *composeService) initialSyncFiles(ctx context.Context, project *types.Pr
}
info, err := d.Info()
if err != nil {
// handle possible path err, just in case...
return err
}
if !d.IsDir() {
Expand Down Expand Up @@ -669,7 +670,7 @@ func (s *composeService) initialSyncFiles(ctx context.Context, project *types.Pr
})
}
}
return pathsToCopy, nil
return pathsToCopy, err
}

func shouldIgnore(rel string, ignore watch.PathMatcher) bool {
Expand All @@ -692,12 +693,12 @@ func (s *composeService) imageCreatedAtForContainer(ctx context.Context, project

var timeCreated time.Time
for _, c := range containers {
image, _, err := s.apiClient().ImageInspectWithRaw(ctx, c.ImageID)
img, _, err := s.apiClient().ImageInspectWithRaw(ctx, c.ImageID)
if err != nil {
return time.Now(), err
}
// Need to get oldest one?
timeCreated, err = time.Parse(time.RFC3339Nano, image.Created)
timeCreated, err = time.Parse(time.RFC3339Nano, img.Created)
if err != nil {
return time.Now(), err
}
Expand Down

0 comments on commit fe051f9

Please sign in to comment.