opentofu/setup-opentofu

Fix the stdout content with active wrapper

kislerdm opened this issue · 2 comments

As a user of the setup-opentofu action, I want to rely on it when using the wrapper for stdout processing.

Problem

The tofu stdout's content captured by the wrapper is prefixed with the command yielding it. Apparently, it's caused by the default behaviour of @actions/exec: see the condition.

Proposed solutions

Propagate stdout/err without relying on @action/exec. See new release of setup-terraform and the fix for context.

Got a related error too, [command]/home/runner/work/_temp/14ffcfc6-c303-48c8-abdb-ddc08da81f56/tofu-bin output -raw xxx is outputted instead of the value when wrapped up with $() in bash. I solved it with terraform_wrapper: false.
This seems to be an old error that was also present in setup-terraform (hashicorp/setup-terraform#20).

@skyf0l I just had the same issue; solved it the same way.