pulumi/tests/integration/printf/nodejs
Joe Duffy 61f27fb51a
Fix #3982, missing output which lacks newlines (#8671)
* Fix #3982, missing output which lacks newlines

If the last line printed to stdout or stderr was missing a
terminating newline, it would go entirely missing (in all languages).
The reason for this is a bug in the engine's handling of plugin
outputs: Go's Reader.ReadString('\n') returns a string containing what
was read and/or an error; if the string terminated in a '\n', the
error is nil, and the entire line is returned; if the stream ends,
however, a non-nil error is returned *and* what was read is returned,
even though it wasn't terminated in a newline. The fix is simple:
instead of ignoring that text, we use it, and *then* exit the read-loop.

Also added some test cases since this is subtle and easy to regress.

* Add a changelog entry
2022-01-03 14:39:10 -08:00
..
.gitignore Fix #3982, missing output which lacks newlines (#8671) 2022-01-03 14:39:10 -08:00
Pulumi.yaml Fix #3982, missing output which lacks newlines (#8671) 2022-01-03 14:39:10 -08:00
index.ts Fix #3982, missing output which lacks newlines (#8671) 2022-01-03 14:39:10 -08:00
package.json Fix #3982, missing output which lacks newlines (#8671) 2022-01-03 14:39:10 -08:00