Skip to content

Commit

Permalink
Merge branch 'master' into releases/1.6.x
Browse files Browse the repository at this point in the history
  • Loading branch information
mmetc committed Feb 10, 2025
2 parents cd98b70 + c5e0003 commit 72b4354
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 3 additions & 1 deletion pkg/cwhub/hub.go
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,9 @@ func (h *Hub) Update(ctx context.Context, indexProvider IndexProvider, withConte
}

if !downloaded {
fmt.Println("Nothing to do, the hub index is up to date.")
// use logger and the message will be silenced in the cron job
// (no mail if nothing happened)
h.logger.Info("Nothing to do, the hub index is up to date.")
}

return nil
Expand Down
3 changes: 2 additions & 1 deletion test/bats/20_hub.bats
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,8 @@ teardown() {
rune -0 cscli hub update
assert_output "Downloading $INDEX_PATH"
rune -0 cscli hub update
assert_output "Nothing to do, the hub index is up to date."
refute_output
assert_stderr 'level=info msg="Nothing to do, the hub index is up to date."'
}

@test "cscli hub upgrade (up to date)" {
Expand Down

0 comments on commit 72b4354

Please sign in to comment.