diff --git a/src/tito/builder/submodule_aware_builder.py b/src/tito/builder/submodule_aware_builder.py index b77ae342..8e195199 100644 --- a/src/tito/builder/submodule_aware_builder.py +++ b/src/tito/builder/submodule_aware_builder.py @@ -72,6 +72,10 @@ def run_git_archive(self, relative_git_dir, prefix, commit, dest_tar, subdir): git_archive_cmd = 'git archive --format=tar --prefix=%s/ %s:%s --output=%s' % ( prefix, commit, relative_git_dir, dest_tar) + if subdir is None: + run_command(git_archive_cmd) + return + with chdir(subdir) as p: run_command(git_archive_cmd)