Skip to content

Commit 4722da3

Browse files
authored
Exclude .venv directories from archiving
Add exclusion for .venv directories to improve performance.
1 parent d070e4a commit 4722da3

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/azure-cli/azure/cli/command_modules/acr/_archive_utils.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,11 @@ def _ignore_check(tarinfo, parent_ignored, parent_matching_rule_index):
7373
logger.warning("Excluding '%s' based on default ignore rules", tarinfo.name)
7474
return True, parent_matching_rule_index
7575

76+
# Exclude .venv directories to avoid performance issues
77+
if tarinfo.isdir() and os.path.basename(tarinfo.name) == '.venv':
78+
logger.warning("Excluding '.venv' directory for performance")
79+
return True, parent_matching_rule_index
80+
7681
if ignore_list is None:
7782
# if .dockerignore doesn't exists, inherit from parent
7883
# eg, it will ignore the files under .git folder.

0 commit comments

Comments
 (0)