Skip to content

Commit aee110d

Browse files
authored
Merge pull request #245 from nicholasSUSE/fix-error-nothing-scanned
removing unnecessary error
2 parents fca76ca + c7fe3d0 commit aee110d

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

pkg/registries/registries.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ package registries
22

33
import (
44
"context"
5-
"errors"
65
"log/slog"
76
"os"
87
"strings"
@@ -76,7 +75,8 @@ func checkStatusAndCommit(ctx context.Context, message string) error {
7675
clean, _ := g.StatusProcelain(ctx)
7776
logger.Log(ctx, slog.LevelDebug, "git status", slog.Bool("clean", clean))
7877
if clean {
79-
return errors.New("should have changes to commit")
78+
logger.Log(ctx, slog.LevelWarn, "nothing to commit")
79+
return nil
8080
}
8181

8282
logger.Log(ctx, slog.LevelDebug, "git add and git commit", slog.String("message", message))

pkg/registries/remote.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -265,6 +265,9 @@ func splitDockerOnlyAndStgImgTags(ctx context.Context, dockerImgTags, stgImgTags
265265
}
266266
}
267267

268+
logger.Log(ctx, slog.LevelDebug, "docker only imgs", slog.Int("imgs", len(dockerOnly)))
269+
logger.Log(ctx, slog.LevelDebug, "staging also imgs", slog.Int("imgs", len(stgAlso)))
270+
268271
return dockerOnly, stgAlso
269272
}
270273

0 commit comments

Comments
 (0)