unsloth/unsloth_cli/commands
Daniel Han 9f3e48ad93 Pin LF in the auth secret writers and migrate legacy files
Both writers used text mode, so on Windows the trailing newline became CRLF.
The Windows Studio smoke jobs run under bash and read the file with
OLD=$(cat ...), which strips the LF but leaves the CR attached, so the
credential goes into the login body as "<secret>\r" and the request fails.

Write bytes in the backend and pin newline in the CLI so the file is
"<secret>\n" on every platform. generate_bootstrap_password() also returned
early on an existing file, so upgraded installs kept the original problem;
it now rewrites anything that isn't already exactly "<secret>\n",
best-effort so a read-only auth dir cannot fail startup.

The raw test assertions used read_text(), which decodes CRLF back to "\n"
and would have stayed green on Windows. They read bytes now.
2026-07-29 04:37:20 +00:00
..
__init__.py Rename cli/ to unsloth_cli/ to fix namespace collision with stringzilla (#4393) 2026-03-17 20:40:21 -07:00
_password_prompt.py Studio: reject whitespace-only passwords (#7341) 2026-07-23 00:44:37 -07:00
chat.py Fix local CLI streamed generation error handling (#7135) 2026-07-20 23:14:58 -03:00
export.py Studio: detect an interrupted dependency install instead of launching a backend that cannot import (#7492) 2026-07-28 10:57:20 +02:00
inference.py Fix local CLI streamed generation error handling (#7135) 2026-07-20 23:14:58 -03:00
start.py Fix Windows Codex temporary home path (#7519) 2026-07-28 03:14:43 -07:00
studio.py Pin LF in the auth secret writers and migrate legacy files 2026-07-29 04:37:20 +00:00
train.py Studio: detect an interrupted dependency install instead of launching a backend that cannot import (#7492) 2026-07-28 10:57:20 +02:00