Skip to content

fix: print warning to stderr (not stdout)

Gonzalo Servat requested to merge print-warning-to-stderr into main

What

Print the warning message to stderr, not stdout.

Why

We sometimes call runwayctl to print some JSON that we then parse. If you print this warning to stdout, then Golang will barf as the warning line is not valid JSON so you get an error like:

Error: terraformPlan(): json.Unmarshal(): invalid character 'W' looking for beginning of value

This MR should fix that as the warning goes to stderr and we only parse stdout for the JSON output.

Edited by Gonzalo Servat

Merge request reports