Skip to content

Conversation

@bendrucker
Copy link
Member

When tflint_wrapper: true is enabled, the wrapper was being installed before version detection and caching. This caused the wrapper to capture TFLint's stdout, preventing the setup action from parsing and outputting the version. It also meant the wrapped binary was cached instead of the real binary, causing failures on subsequent cache hits.

Issue

The wrapper script intercepts TFLint execution and captures stdout/stderr. When installed before version detection, running tflint --version produced no output for the setup script to parse, triggering the warning "Unable to parse tflint version from output."

Additionally, the wrapper was installed before caching, so the cache contained the wrapped binary. On cache hits, the version detection would fail because it was calling the wrapper without the real binary (tflint-bin) present.

Changes

  • Extract version detection logic into getInstalledVersion function
  • Move wrapper installation to run after version detection and caching
  • Update integration-wrapper workflow to verify tflint-version output is captured

Testing

  • Added test step to verify tflint-version output with wrapper enabled
  • Tested locally with act for both fresh installs and cached scenarios

References

Closes #356

- Extract version detection into getInstalledVersion function
- Move wrapper installation after version detection and caching
- Ensures version output is captured before wrapper intercepts stdout
- Prevents caching wrapped binary, which caused issues on cache hits
- Add test to verify tflint-version output with wrapper enabled

Fixes #356
@bendrucker bendrucker merged commit 481814e into master Oct 30, 2025
17 checks passed
@bendrucker bendrucker deleted the fix-wrapper-version-detection branch October 30, 2025 04:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

"Warning: Unable to parse tflint version from output" is printed when tflint_wrapper is enabled

2 participants