Commit eae9fed
committed
fix(openssl/windows): the batch needs CRLF — cmd resumes a called script by file offset
Third run, and this time the log shows the batch working right up to the point
it matters:
[bat] vspath=C:\Program Files\Microsoft Visual Studio\18\Enterprise
** Visual Studio 2026 Developer Command Prompt v18.8.2
[vcvarsall.bat] Environment initialized for: 'x64'
…and then nothing. No 'toolset ready', no 'where perl', no RESULT, exit 0.
cmd reads a batch file by FILE OFFSET and that bookkeeping assumes CRLF. With
the LF-only file the previous commit introduced, returning from `call` resumes
at the wrong position and lands on EOF — a script that reports success having
done nothing past its first call.
This also corrects the reasoning in that commit: it claimed io.writefile
translates \n to CRLF on windows, so emitting \r\n would double it. The run
disproves that — io.writefile writes bytes verbatim, which is exactly why the
LF-only file reached cmd as LF-only. Line endings go back to \r\n; everything
else from that commit (per-step logging, RESULT= reporting rather than trusting
os.exec) stays, and is what made this diagnosable at all.1 parent 6fdf286 commit eae9fed
1 file changed
Lines changed: 9 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
464 | 464 | | |
465 | 465 | | |
466 | 466 | | |
467 | | - | |
468 | | - | |
469 | | - | |
470 | | - | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
471 | 475 | | |
472 | 476 | | |
473 | 477 | | |
| |||
499 | 503 | | |
500 | 504 | | |
501 | 505 | | |
502 | | - | |
| 506 | + | |
503 | 507 | | |
504 | 508 | | |
505 | 509 | | |
| |||
0 commit comments