Terraform CLI runs sometimes only produce output on stderr, or writes its final output to stderr. Tests for variable validation conditions and pre/post conditions often elicit this behaviour. On Windows 10 and Python 3.9, this leads to a hang. Line 714 (in this PR) is a blocking operation that will never be satisfied given no further standard output will be observed.
This PR hacks around it when running on Windows by redirecting stderr to stdout. This truly is a hack, because later logic from line 724 onwards assumes err will contain stderr but will now always be empty. In practice, this seems to work on Windows OK.
Terraform CLI runs sometimes only produce output on stderr, or writes its final output to stderr. Tests for variable validation conditions and pre/post conditions often elicit this behaviour. On Windows 10 and Python 3.9, this leads to a hang. Line 714 (in this PR) is a blocking operation that will never be satisfied given no further standard output will be observed.
This PR hacks around it when running on Windows by redirecting stderr to stdout. This truly is a hack, because later logic from line 724 onwards assumes
err
will contain stderr but will now always be empty. In practice, this seems to work on Windows OK.A better solution might be to do something like https://stackoverflow.com/a/4896288. This pushes my limited python-fu.