Skip to content

Fix unquoted argument iteration in tfenv-exec.sh#463

Merged
Zordrak merged 1 commit intomasterfrom
fix/453-unquoted-args-tfenv-exec
Apr 24, 2026
Merged

Fix unquoted argument iteration in tfenv-exec.sh#463
Zordrak merged 1 commit intomasterfrom
fix/453-unquoted-args-tfenv-exec

Conversation

@Zordrak
Copy link
Copy Markdown
Collaborator

@Zordrak Zordrak commented Apr 24, 2026

Fixes #453

for _arg in ${@:1} word-splits arguments containing spaces, breaking terraform commands that pass quoted args (e.g. terraform import with resource addresses containing brackets).

Changed to for _arg in "${@}" which preserves argument boundaries.

Testing

  • ./test/run.sh test_install_and_use.sh — all tests pass on Linux.

Fix #453: Quote ${@} in for-loop to prevent word-splitting.

"for _arg in ${@:1}" word-splits arguments containing spaces, breaking
terraform commands that pass quoted arguments (e.g. terraform import
with resource addresses containing brackets). Changed to "for _arg in
"${@}"" which preserves argument boundaries.
@Zordrak Zordrak merged commit b9f50bc into master Apr 24, 2026
5 checks passed
@Zordrak Zordrak deleted the fix/453-unquoted-args-tfenv-exec branch April 24, 2026 15:11
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.

Bug: Unquoted ${@:1} word-splits arguments with spaces in tfenv-exec.sh

1 participant