Skip to content

Commit 72b4354

Browse files
committed
Merge branch 'master' into releases/1.6.x
2 parents cd98b70 + c5e0003 commit 72b4354

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

Diff for: pkg/cwhub/hub.go

+3-1
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,9 @@ func (h *Hub) Update(ctx context.Context, indexProvider IndexProvider, withConte
165165
}
166166

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

171173
return nil

Diff for: test/bats/20_hub.bats

+2-1
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,8 @@ teardown() {
109109
rune -0 cscli hub update
110110
assert_output "Downloading $INDEX_PATH"
111111
rune -0 cscli hub update
112-
assert_output "Nothing to do, the hub index is up to date."
112+
refute_output
113+
assert_stderr 'level=info msg="Nothing to do, the hub index is up to date."'
113114
}
114115

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

0 commit comments

Comments
 (0)