Skip to content

Commit 13b5b73

Browse files
Hmbownclaude
andcommitted
Fix Windows CI test failures: headless PromptSession + /tmp path
- Wrap fallback PromptSession() in try/except so headless Windows CI gracefully falls back to input() instead of crashing - Use tempfile.gettempdir() instead of hardcoded /tmp/ in sandbox test Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 971436b commit 13b5b73

2 files changed

Lines changed: 6 additions & 2 deletions

File tree

src/nemocode/cli/commands/repl.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,10 @@ def __init__(self) -> None:
9090
self._session = PromptSession(history=history)
9191
except Exception:
9292
# If history file is unwritable or any other issue, run without history
93-
self._session = PromptSession()
93+
try:
94+
self._session = PromptSession()
95+
except Exception:
96+
pass # No terminal available (e.g. Windows CI) — fall back to input()
9497

9598
async def read(self, mode: str = "code") -> str | None:
9699
"""Read user input. Returns None on EOF (Ctrl+D). Raises KeyboardInterrupt on Ctrl+C."""

tests/test_sandbox.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,8 @@ async def test_write_inside_project_allowed(self, tmp_path):
5656
async def test_edit_outside_project_rejected(self, tmp_path):
5757
set_project_root(tmp_path)
5858
# Create a file outside the project
59-
outside = Path("/tmp/nemocode_test_outside.txt")
59+
import tempfile
60+
outside = Path(tempfile.gettempdir()) / "nemocode_test_outside.txt"
6061
outside.write_text("original")
6162
try:
6263
result = await edit_file(str(outside), "original", "modified")

0 commit comments

Comments
 (0)