2
0
mirror of https://github.com/frappe/bench.git synced 2024-06-18 16:12:20 +00:00

Merge pull request #1526 from frappe/bump-tar-limit

fix: increase tar file limit
This commit is contained in:
Alan 2024-02-01 15:16:31 +05:30 committed by GitHub
commit 0098bfc9fa
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -370,10 +370,13 @@ class App(AppMeta):
click.secho(f"Getting {self.app_name} from cache", fg="yellow")
with tarfile.open(cache_path, mode) as tar:
extraction_filter = get_app_cache_extract_filter(count_threshold=150_000)
try:
tar.extractall(app_path.parent, filter=get_app_cache_extract_filter())
tar.extractall(app_path.parent, filter=extraction_filter)
except Exception:
logger.exception(f"Cache extraction failed for {self.app_name}")
message = f"Cache extraction failed for {self.app_name}, skipping cache"
click.secho(message, fg="yellow")
logger.exception(message)
shutil.rmtree(app_path)
return False