Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/apm_cli/core/script_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ def run_script(self, script_name: str, params: Dict[str, str]) -> bool:
if discovered_prompt:
# Print discovery message early to allow E2E tests to validate
# This message appears before runtime detection, which may fail in test environments
print(f"[i] Auto-discovered: {discovered_prompt}")
print(f"[i] Auto-discovered: {discovered_prompt.as_posix()}")

# Detect runtime and generate command
runtime = self._detect_installed_runtime()
Expand Down
6 changes: 3 additions & 3 deletions src/apm_cli/output/script_formatters.py
Original file line number Diff line number Diff line change
Expand Up @@ -321,17 +321,17 @@ def format_auto_discovery_message(self, script_name: str, prompt_file: Path, run
try:
text = Text()
text.append("[i] Auto-discovered: ", style="cyan")
text.append(str(prompt_file), style="bold white")
text.append(prompt_file.as_posix(), style="bold white")
text.append(f" (runtime: {runtime})", style="dim")

with self.console.capture() as capture:
self.console.print(text)
return capture.get().rstrip('\n')
except Exception:
# Fallback to simple formatting
return f"[i] Auto-discovered: {prompt_file} (runtime: {runtime})"
return f"[i] Auto-discovered: {prompt_file.as_posix()} (runtime: {runtime})"
else:
return f"[i] Auto-discovered: {prompt_file} (runtime: {runtime})"
return f"[i] Auto-discovered: {prompt_file.as_posix()} (runtime: {runtime})"

def _styled(self, text: str, style: str) -> str:
"""Apply styling to text with rich fallback."""
Expand Down
Loading