mirror of
https://github.com/prometheus/alertmanager
synced 2024-12-28 00:52:13 +00:00
Fix updating silence comments (#1189)
Possibly another regression introduced by #976 . We use the wrong variable to update comments in the `amtool silence update` command which causes us to fail silently. This fixes that.
This commit is contained in:
parent
a7d4e4ea7c
commit
17846f2e33
@ -103,8 +103,8 @@ func updateSilence(silence *types.Silence) (*types.Silence, error) {
|
||||
silence.EndsAt = *updateExpiresOn
|
||||
}
|
||||
|
||||
if *comment != "" {
|
||||
silence.Comment = *comment
|
||||
if *updateComment != "" {
|
||||
silence.Comment = *updateComment
|
||||
}
|
||||
|
||||
// addSilence can also be used to update an existing silence
|
||||
|
Loading…
Reference in New Issue
Block a user