Commit 6a501cc
authored
install.bat: fix parens-in-username breaking OTP path expansion (#1826)
On Windows, when %USERPROFILE% contains parentheses (e.g.
`PeterLinder(3Txpert)`), four lines in install.bat fail because
%tmp_dir% expands inside `if (...)` cmd-batch blocks at parse time —
the embedded close-paren terminates the if-block early, producing
"syntactisch nicht verarbeitbar" / "syntactically unprocessable"
errors before the OTP download even begins.
Two complementary fixes match the existing patterns:
- Quote the path argument in curl.exe / del (lines 148, 205) — the
Elixir-side curl at line 192 was already correctly quoted; this
restores symmetry with the OTP-side calls.
- Use delayed expansion `!tmp_dir!\!otp_zip!` (lines 150, 194) — both
are inside if-blocks where %tmp_dir% would expand at parse time.
Delayed expansion expands at execution time, after the parser has
already matched the if-block parens.
Verified locally on a Windows account with parenthesized username:
unpatched `install.bat elixir@latest otp@latest` fails before OTP
download; patched version completes both downloads cleanly.1 parent 46bcf52 commit 6a501cc
1 file changed
Lines changed: 4 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
145 | 145 | | |
146 | 146 | | |
147 | 147 | | |
148 | | - | |
| 148 | + | |
149 | 149 | | |
150 | | - | |
| 150 | + | |
151 | 151 | | |
152 | 152 | | |
153 | 153 | | |
| |||
191 | 191 | | |
192 | 192 | | |
193 | 193 | | |
194 | | - | |
| 194 | + | |
195 | 195 | | |
196 | 196 | | |
197 | 197 | | |
| |||
202 | 202 | | |
203 | 203 | | |
204 | 204 | | |
205 | | - | |
| 205 | + | |
206 | 206 | | |
207 | 207 | | |
0 commit comments