Stat-aware local walk, atomic flag+env application, guard degenerate basedir and -include- flags

This commit is contained in:
J. Nick Koston
2026-08-26 13:14:03 -05:00
parent 3730f7bbae
commit 6530bb62f8
7 changed files with 128 additions and 58 deletions
@@ -129,3 +129,7 @@ def test_effective_ccache_basedir_prefers_user_value(tmp_path: Path) -> None:
assert ccache.effective_ccache_basedir() == "/custom/base"
with patch.dict(os.environ, {}, clear=True):
assert ccache.effective_ccache_basedir() == str(tmp_path.resolve())
# Degenerate values would strip substrings ccache never rewrites
for bad in ("", "/"):
with patch.dict(os.environ, {"CCACHE_BASEDIR": bad}, clear=True):
assert ccache.effective_ccache_basedir() == str(tmp_path.resolve())