Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change tfdoc pre-commit hook script to use while read #2717

Merged
merged 1 commit into from
Nov 19, 2024

Conversation

rosmo
Copy link
Collaborator

@rosmo rosmo commented Nov 19, 2024

Use read line instead of xargs. While probably a bit slower, this works reliably on Linux and OS X. (BSD and GNU xargs are unfortunately with different arguments) Also added option to set Python binary (eg. export PYTHON=python3). pre-commit.com hooks stash uncommitted changes, so patching it locally isn't really a good option.

On OS X:

Regenerate README.md with tfdoc.py........................................Failed
- hook id: cff-readme
- exit code: 1

xargs: command line cannot be assembled, too long

I applicable, I acknowledge that I have:

  • Read the contributing guide
  • Ran terraform fmt on all modified files
  • Regenerated the relevant README.md files using tools/tfdoc.py
  • Made sure all relevant tests pass

…s. While

probably a bit slower, this works reliably on Linux and OS X. (BSD and GNU
xargs are unfortunately with different arguments) Also added option to set
Python binary (eg. export PYTHON=python3).
@github-actions github-actions bot added the on:tools New or changed tool label Nov 19, 2024
@rosmo rosmo merged commit ebc1950 into GoogleCloudPlatform:master Nov 19, 2024
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
on:tools New or changed tool
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants