feat(codex): add Windows support and compatibility for Codex plugin

This commit is contained in:
Sparsh :)
2026-07-05 17:23:51 +05:30
parent 25b0f39405
commit 3c45db3a90
8 changed files with 311 additions and 24 deletions
+2
View File
@@ -71,6 +71,8 @@ def _runner_cmd(project: str, backend: str, extra: str, python: str) -> str:
# use absolute python + -m so cron's minimal env still works
cmd = (f'{python} -m skillopt_sleep run --project "{project}" '
f'--scope invoked --backend {backend} {extra}'.rstrip())
if sys.platform == "win32":
return f'if not exist "{logdir}" mkdir "{logdir}" && cd /d "{_repo_root()}" && {cmd} >> "{log}" 2>&1'
return f'mkdir -p "{logdir}"; cd "{_repo_root()}" && {cmd} >> "{log}" 2>&1'