贡献 / #1939

#1939 setup: write run-<model>.bat and the build .bat with single CRLF line ends

open · @markusrenneronline · 0 评论 · 去 GitHub 看

Setup & installServer & APIModels & quantsWindows

说明

`write_run_script()` and the Windows build step write their `.bat` files with explicit `\r\n`, but through `Path.write_text()` in text mode. On Windows text mode translates every `\n` again, so the files end up with `\r\r\n` (seen in a freshly written `run-coder-iq1_m.bat`: `@echo off\r\r\n`). `cmd` tolerates it, so nothing breaks today, but the files are not what the code intends.

- `setup.py`: `newline=""` in both `write_text()` calls (run script, build `.bat`), so the `\r\n` are written as is.
- `tools/test_setup_run_script_newlines.py`: writes the run script with `WIN` patched into a temp folder and checks for single CRLF line ends. On Windows it fails without the fix and passes with it.

No other behavior changes. (Two serve tests also write `\r\n` through `write_text`; left as they are, they only create helper scripts.)

本站相关内容

相关页面的快捷入口。