From 36670f3ef4a7661ab4fffce9e851137354b65343 Mon Sep 17 00:00:00 2001 From: Simon Li Date: Sun, 15 Sep 2024 16:28:06 +0100 Subject: [PATCH] tar: don't add recursively files and directories are already listed individually, recursive causes duplicate files to be added --- repo2docker/buildpacks/base.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/repo2docker/buildpacks/base.py b/repo2docker/buildpacks/base.py index f8dcf758..d3e8ec40 100644 --- a/repo2docker/buildpacks/base.py +++ b/repo2docker/buildpacks/base.py @@ -630,7 +630,7 @@ def _filter_tar(tarinfo): if files_to_add: for item in files_to_add: - tar.add(item, f"src/{item}", filter=_filter_tar) + tar.add(item, f"src/{item}", recursive=False, filter=_filter_tar) else: # Either the source was empty or everything was filtered out. # In any case, create an src dir so the build can proceed.