From f5d61594e310100abb87013f107ad002b52750e2 Mon Sep 17 00:00:00 2001 From: Jerzy Drozdz Date: Thu, 29 Sep 2022 13:02:14 +0200 Subject: [PATCH] Fixed issue #413 --- src/tito/builder/submodule_aware_builder.py | 4 ++++ 1 file changed, 4 insertions(+) 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)