Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Assure CWD is readable after acquiring it
Fixes #1334
  • Loading branch information
Byron committed Sep 5, 2021
commit 2180a8bda09578f4fde7ce760855c32ca78e0775
2 changes: 2 additions & 0 deletions git/cmd.py
Original file line number Diff line number Diff line change
Expand Up @@ -783,6 +783,8 @@ def execute(self,
# Allow the user to have the command executed in their working dir.
try:
cwd = self._working_dir or os.getcwd() # type: Union[None, str]
if not os.access(str(cwd), os.X_OK):
cwd = None
except FileNotFoundError:
cwd = None

Expand Down