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

Update tfenv-min-required grep logic to prefer working root directory declarations first before recursing. #203

Merged
merged 2 commits into from
Jan 30, 2021

Conversation

paullschock
Copy link
Contributor

@paullschock paullschock commented Jul 25, 2020

Proposing that tfenv 'min-required' first searches the working directory before recursing.

In this case if the first grep does not return exit code 0, || operator will instead run grep -R and keep searching

This prevents unexpected version matches in cases where path based child modules might have their own required_version blocks. Since terraform itself first parses the base directory, it would seem reasonable tfenv would follow suit.

Proposing that tfenv 'min-required' only first searches the working directory first, before recursing. This prevents unexpected version matches in cases where path based child modules might have their own required_version blocks. Since terraform itself first parses the base directory, it would seem reasonable tfenv would follow suit.
@paullschock
Copy link
Contributor Author

Sorry for that commit message length, it was a small change and I did it via github visual editor and realized right after what I'd done.

Zordrak
Zordrak previously approved these changes Jan 30, 2021
@Zordrak Zordrak merged commit 64522ab into tfutils:master Jan 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants