diff --git a/scripts/harness_checks/line_count_baseline.json b/scripts/harness_checks/line_count_baseline.json index 796334f45..817dc8b32 100644 --- a/scripts/harness_checks/line_count_baseline.json +++ b/scripts/harness_checks/line_count_baseline.json @@ -1,11 +1,12 @@ { - "hard_cap": 3000, - "warn_cap": 1500, - "root": "harness-discipline-docs", - "offenders": { - "src/spark_cli/cli.py": 18105, - "src/spark_cli/system_map.py": 5658, - "tests/test_cli.py": 14759, - "tests/test_system_map.py": 2055 - } -} + "hard_cap": 3000, + "warn_cap": 1500, + "root": "harness-discipline-docs", + "offenders": { + "src/spark_cli/cli.py": 18111, + "src/spark_cli/system_map.py": 5658, + "tests/test_cli.py": 14759, + "tests/test_system_map.py": 2055 + }, + "src/spark_cli/cli.py": 18111 +} \ No newline at end of file diff --git a/src/spark_cli/cli.py b/src/spark_cli/cli.py index 8a444135e..83db4db8f 100644 --- a/src/spark_cli/cli.py +++ b/src/spark_cli/cli.py @@ -1135,11 +1135,12 @@ def schedule_deferred_windows_purge(target: Path) -> None: temp_root = Path(os.environ.get("TEMP") or os.environ.get("TMP") or Path.home()).expanduser() temp_root.mkdir(parents=True, exist_ok=True) script_path = temp_root / f"spark-purge-home-{os.getpid()}.cmd" + safe_target = str(target).replace('"', '""') script_path.write_text( "\n".join( [ "@echo off", - f'set "SPARK_PURGE_TARGET={target}"', + f'set "SPARK_PURGE_TARGET={safe_target}"', "timeout /t 2 /nobreak >nul", 'icacls "%SPARK_PURGE_TARGET%" /grant "%USERDOMAIN%\\%USERNAME%:(OI)(CI)F" /T /C >nul 2>nul', "for /l %%i in (1,1,30) do (",