Improve Windows Python setup guidance

This commit is contained in:
2026-04-30 03:31:43 +09:00
parent 9f2fdc1369
commit bb965c061e
4 changed files with 32 additions and 9 deletions

View File

@@ -18,7 +18,7 @@ function canRun(command: string, args: string[]): boolean {
const result = spawnSync(command, [...args, "--version"], {
encoding: "utf8",
});
return result.status === 0;
return result.error == null && result.status === 0;
}
export function resolveLocalAiVenvPath(config: AppConfig): string {
@@ -83,8 +83,9 @@ export function resolvePythonLaunch(config: AppConfig, options?: { preferVenv?:
[
"Python 실행 파일을 찾지 못했습니다.",
"1. Python 3.11 이상을 설치",
"2. 필요하면 `.env` 에 `LOCAL_AI_PYTHON=python` 또는 `LOCAL_AI_PYTHON=py -3` 설정",
"3. 그 다음 `bun run setup:local-ai` 실행",
"2. Windows면 `py -3 --version` 이 되는지 먼저 확인",
"3. 되면 `.env` 에 `LOCAL_AI_PYTHON=py -3` 설정",
"4. 그 다음 `bun run setup:local-ai` 실행",
].join("\n"),
);
}