Add offline fallbacks for remote components #9

Merged
Dusk-92 merged 101 commits from test/remote-fallbacks into main 2026-09-04 15:03:01 +00:00
Showing only changes of commit 943caba91c - Show all commits
+7 -1
View File
@@ -262,11 +262,17 @@ def _atomic_replace_file(source, target):
def _package_cache_dir(target_dir, package_id):
safe_id = "".join(
ch if ch.isalnum() or ch in ("-", "_", ".") else "_"
for ch in str(package_id)
)
if safe_id in ("", ".", ".."):
raise RemotePackageError("Invalid package-cache ID.")
return os.path.join(
target_dir,
".modernization_tool",
"package_cache",
str(package_id),
safe_id,
)