Skip to content

Fix unquoted curl options in curlw() to handle paths with spaces#464

Merged
Zordrak merged 1 commit intomasterfrom
fix/454-unquoted-netrc-opt
Apr 24, 2026
Merged

Fix unquoted curl options in curlw() to handle paths with spaces#464
Zordrak merged 1 commit intomasterfrom
fix/454-unquoted-netrc-opt

Conversation

@Zordrak
Copy link
Copy Markdown
Collaborator

@Zordrak Zordrak commented Apr 24, 2026

Fixes #454

Converts TLS_OPT and NETRC_OPT from strings to bash arrays so they are properly quoted when passed to curl. Previously, a TFENV_NETRC_PATH containing spaces would be word-split, breaking the curl call.

Uses the ${arr[@]+"${arr[@]}"} expansion pattern for safe empty-array handling on bash <4.4 (macOS default bash 3.2 chokes on "${empty_arr[@]}" with set -u).

Testing

  • ./test/run.sh test_install_and_use.sh — all tests pass on Linux (exercises curlw for every download).

Fix #454: Convert TLS_OPT and NETRC_OPT from strings to arrays so they
are properly quoted when passed to curl. Paths with spaces in
TFENV_NETRC_PATH would previously be word-split.

Uses ${arr[@]+"${arr[@]}"} pattern for safe empty-array expansion on
bash versions older than 4.4 (notably macOS default bash 3.2).
@Zordrak Zordrak merged commit 5eceac2 into master Apr 24, 2026
5 checks passed
@Zordrak Zordrak deleted the fix/454-unquoted-netrc-opt branch April 24, 2026 15:12
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 NETRC_OPT in curlw() breaks paths with spaces

1 participant