Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
feat: Add support for version constraints in
tfupdate
#437feat: Add support for version constraints in
tfupdate
#437Changes from 5 commits
92e64df
2f88e60
3233c37
dd470ad
d699d24
031296a
68a7f51
7866b64
41b0489
7eccb5a
cb9c726
d289774
d51b470
e57286b
6321039
22fa93a
8e379da
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would a simpler code work here? This also makes no need for
args_array_length
var.On the other hand the whole loop looks quite like simple
args=("$@")
🤔There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, I seem to think I understand why
args_array_length
is needed.Though given
common::per_dir_hook "$HOOK_ID" "${ARGS[*]}" "${FILES[@]}"
, which is used across this PR, the 2nd ARG to this current function has ARGS array rather than number of its elements — is this expected? So it's eithercommon::per_dir_hook "$HOOK_ID" "${#ARGS[*]}" "${ARGS[*]}" "${FILES[@]}"
, or I am missing something essential 🤔 (probably it's right about time to leave this for tomorrow 😛)There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, I couldn't leave it for tomorrow.
This
while
thing doesn't work as expected for me, and givencommon::per_dir_hook "$HOOK_ID" "${ARGS[*]}" "${FILES[@]}"
this should be that all same thing from our discussion in Slack:There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No idea why, but the suggested solution does not work here 🤔
7866b64
(#437)I try to replace
common::per_dir_hook "${ARGS[*]}"
withcommon::per_dir_hook "${ARGS[@]}"
but got a weird errorAlso, no luck with changing
per_dir_hook_unique_part "${args[@]}"
toper_dir_hook_unique_part "${args[*]}"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hm-m-m, that's odd. By the way how come args come in with
__REPLACED__SPACE__
thing in them? Is the__REPLACED__SPACE__
to be replaced with actual space later down the code? 🤔I didn't check the code with
__REPLACED__SPACE__
in args instead of spaces...There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be. Firstly, it replaces spaces with placeholders and then placeholders with spaces. Check file for
__REPLACED__SPACE__
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nah, I mean is this expected that at this place the
__REPLACED__SPACE__
isn't replaced with spaces yet? This may influence how we should be parsing array elements since elements values are not space-separated string, but__REPLACED__SPACE__
-separated string.