diff --git a/src/apm_cli/core/script_runner.py b/src/apm_cli/core/script_runner.py index ec3d09a20..f8243c9b3 100644 --- a/src/apm_cli/core/script_runner.py +++ b/src/apm_cli/core/script_runner.py @@ -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() diff --git a/src/apm_cli/output/script_formatters.py b/src/apm_cli/output/script_formatters.py index 12f30b059..779606984 100644 --- a/src/apm_cli/output/script_formatters.py +++ b/src/apm_cli/output/script_formatters.py @@ -321,7 +321,7 @@ 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: @@ -329,9 +329,9 @@ def format_auto_discovery_message(self, script_name: str, prompt_file: Path, run 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."""