Eliminate use of git worktree prune
Signed-off-by: Bence Szépkúti <bence.szepkuti@arm.com>
diff --git a/scripts/abi_check.py b/scripts/abi_check.py
index 18eb9d3..c526f15 100755
--- a/scripts/abi_check.py
+++ b/scripts/abi_check.py
@@ -398,13 +398,14 @@
"""Remove the specified git worktree."""
shutil.rmtree(git_worktree_path)
submodule_output = subprocess.check_output(
- [self.git_command, "submodule", "foreach", "--recursive", "git worktree prune"],
+ [self.git_command, "submodule", "foreach", "--recursive",
+ f'git worktree remove "{git_worktree_path}/$displaypath"'],
cwd=self.repo_path,
stderr=subprocess.STDOUT
)
self.log.debug(submodule_output.decode("utf-8"))
worktree_output = subprocess.check_output(
- [self.git_command, "worktree", "prune"],
+ [self.git_command, "worktree", "remove", git_worktree_path],
cwd=self.repo_path,
stderr=subprocess.STDOUT
)