Assume no terminal if the display width/height is 0 (#5959)
This commit is contained in:
parent
1c87d58b4a
commit
518ec3a8a5
|
@ -16,6 +16,9 @@ CHANGELOG
|
|||
- Fix a bug in the core engine where ComponentResource state would be accessed before initialization.
|
||||
[#5949](https://github.com/pulumi/pulumi/pull/5949)
|
||||
|
||||
- Prevent a panic by not attempting to show progress for zero width/height terminals.
|
||||
[#5957](https://github.com/pulumi/pulumi/issues/5957)
|
||||
|
||||
## 2.15.6 (2020-12-12)
|
||||
|
||||
- Fix a bug in the Go SDK that could result in dropped resource dependencies.
|
||||
|
|
|
@ -327,6 +327,13 @@ func ShowProgressEvents(op string, action apitype.UpdateKind, stack tokens.QName
|
|||
display.terminalWidth = terminalWidth
|
||||
display.terminalHeight = terminalHeight
|
||||
|
||||
// Don't bother attempting to treat this display as a terminal if it has no width/height.
|
||||
if display.isTerminal && (display.terminalWidth == 0 || display.terminalHeight == 0) {
|
||||
display.isTerminal = false
|
||||
_, err = fmt.Fprintln(stderr, "Treating display as non-terminal due to 0 width/height.")
|
||||
contract.IgnoreError(err)
|
||||
}
|
||||
|
||||
// Fetch the canonical stdout stream, configured appropriately.
|
||||
_, stdout, _ = term.StdStreams()
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue