From 0e353ae03fb98d7aa4165b8b32ba4311f6539b30 Mon Sep 17 00:00:00 2001 From: Trevin Chow Date: Sun, 17 May 2026 00:19:49 -0700 Subject: [PATCH] fix(render): apply as_posix to fallback branch + hoist shutil import --- skills/last30days/scripts/last30days.py | 2 +- tests/test_cli_v3.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/skills/last30days/scripts/last30days.py b/skills/last30days/scripts/last30days.py index 4efd03b..6a82454 100644 --- a/skills/last30days/scripts/last30days.py +++ b/skills/last30days/scripts/last30days.py @@ -197,7 +197,7 @@ def compute_save_path_display(save_dir: str, topic: str, suffix: str, emit: str) relative = raw.relative_to(home) return f"~/{relative.as_posix()}" except ValueError: - return str(raw) + return raw.as_posix() def read_synthesis_file(path: str) -> str: diff --git a/tests/test_cli_v3.py b/tests/test_cli_v3.py index feba03d..23e5dc2 100644 --- a/tests/test_cli_v3.py +++ b/tests/test_cli_v3.py @@ -1,6 +1,7 @@ # ruff: noqa: E402 import json import io +import shutil import tempfile import subprocess import sys @@ -150,7 +151,6 @@ class CliV3Tests(unittest.TestCase): # f"~/{relative.as_posix()}" which forces forward slashes regardless # of host OS. On POSIX hosts this asserts the contract for # cross-platform safety; on Windows hosts it would fail without the fix. - import shutil real_home = Path.home() tmp_under_home = Path(tempfile.mkdtemp(prefix="l30d_save_path_", dir=str(real_home))) try: