fix(cli): emit PowerShell-compatible model-cleanup command on Windows#1559
Conversation
The model-cleanup hint printed by 'gaia init' on Windows used cmd's 'rmdir /s /q', which is not valid PowerShell syntax (GAIA's assumed Windows shell). Emit 'Remove-Item -Recurse -Force' instead so the copy-paste command actually works. Closes #554
Review: fix(cli): emit PowerShell-compatible model-cleanup command on WindowsSummaryCorrect, well-scoped fix — approve. The Windows recovery hint in The one thing worth knowing: there's still no test guarding this branch — see below. Issues🟢 Minor — No regression guard for the cleanup-hint strings
Strengths
VerdictApprove. No blocking issues. The missing regression test is a genuine nice-to-have that the author has already acknowledged as a follow-up — safe to merge as-is, ideally with that test added in a quick follow-up PR. |
On Windows,
gaia init's "manually delete failed models" hint printed cmd'srmdir /s /q, which fails when pasted into PowerShell — GAIA's assumed Windows shell — leaving users (per #554) unable to follow the recovery steps the model-verification output told them to run. After this change the hint emitsRemove-Item -Recurse -Force "<path>", the valid PowerShell form already used elsewhere in the repo (run.ps1), so the copy-paste recovery command works.Closes #554.
Test plan
gaia initand confirm the printed cleanup command isRemove-Item -Recurse -Force "<path>"and runs in PowerShellrm -rf "<path>"(non-win32 branch unchanged)python -m pytest tests/unit/test_init_command.pyFollow-up (non-blocking): add a tiny unit test to
tests/unit/test_init_command.pyasserting the win32 vs non-win32 cleanup-hint strings, to guard against regression back to cmd syntax.