Ensure CLI doesn't panic when pulumi watch is used with policies enabled (#5569)

Fixes: #5561
This commit is contained in:
Paul Stack 2020-10-17 21:29:16 +01:00 committed by GitHub
parent eaac9280f5
commit 7f0bc891c4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 1 deletions

View file

@ -2,7 +2,9 @@ CHANGELOG
=========
## HEAD (Unreleased)
_(none)_
- [cli] Ensure that the CLI doesn't panic when using pulumi watch and policies are enabled
[#5569](https://github.com/pulumi/pulumi/pull/5569)
## 2.12.0 (2020-10-14)

View file

@ -50,6 +50,9 @@ func ShowWatchEvents(op string, action apitype.UpdateKind, events <-chan engine.
case engine.PreludeEvent, engine.SummaryEvent, engine.StdoutColorEvent:
// Ignore it
continue
case engine.PolicyViolationEvent:
// At this point in time, we don't handle policy events as part of pulumi watch
continue
case engine.DiagEvent:
// Skip any ephemeral or debug messages, and elide all colorization.
p := e.Payload().(engine.DiagEventPayload)