Commit ec30be8
committed
Fix operator precedence bug and unbound variable in tfenv-version-name.sh
Fix #406: Replace undefined ${requested} variable with ${TFENV_VERSION}
in the error message on line 82. The variable was introduced in commit
3dc5819 but never existed in scope, causing an unbound variable crash
under set -u before the error message could be displayed.
Fix #431: Fix shell operator precedence in the version file read on
line 13. The original "cat ... || true | tr" meant tr only ran on the
failure path due to || binding tighter than |. Restructured to
"cat ... | tr ... || true" so carriage returns are always stripped.
Also addresses #447 (WSL carriage return symptoms) which shares the
same root cause as #431.1 parent fa8d238 commit ec30be8
1 file changed
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
| 13 | + | |
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| |||
77 | 77 | | |
78 | 78 | | |
79 | 79 | | |
80 | | - | |
| 80 | + | |
81 | 81 | | |
82 | 82 | | |
83 | 83 | | |
| |||
0 commit comments