From 0d42c549b09786698e754396c8444b1d1b69ce88 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Fri, 22 Sep 2023 16:52:11 +0200 Subject: [PATCH] git: dont pass additional cwd --- pkgs/clan-cli/clan_cli/git.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pkgs/clan-cli/clan_cli/git.py b/pkgs/clan-cli/clan_cli/git.py index 72db4c114..12ba4df51 100644 --- a/pkgs/clan-cli/clan_cli/git.py +++ b/pkgs/clan-cli/clan_cli/git.py @@ -48,7 +48,7 @@ def _commit_file_to_git(repo_dir: Path, file_path: Path, commit_message: str) -> ) # add the file to the git index try: - subprocess.run(cmd, cwd=repo_dir, check=True) + subprocess.run(cmd, check=True) except subprocess.CalledProcessError as e: raise ClanError( f"Failed to add {file_path} to git repository {repo_dir}:\n{shlex.join(cmd)}\n exited with {e.returncode}" @@ -80,7 +80,6 @@ def _commit_file_to_git(repo_dir: Path, file_path: Path, commit_message: str) -> try: subprocess.run( cmd, - cwd=repo_dir, check=True, ) except subprocess.CalledProcessError as e: