diff options
author | Sebastian Thiel <sebastian.thiel@icloud.com> | 2021-09-05 11:27:23 +0800 |
---|---|---|
committer | Sebastian Thiel <sebastian.thiel@icloud.com> | 2021-09-05 11:40:50 +0800 |
commit | 5da76e8b4466459a3b6a400c4750a622879acce8 (patch) | |
tree | 31f8de72d32ce2b1f670d41c0e1fc508e419aa2c /git/cmd.py | |
parent | ef1ef4db2553384cc615ca2c5836883c52b910b0 (diff) | |
download | gitpython-5da76e8b4466459a3b6a400c4750a622879acce8.tar.gz |
Assure CWD is readable after acquiring it
Fixes #1334
Diffstat (limited to 'git/cmd.py')
-rw-r--r-- | git/cmd.py | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -783,6 +783,8 @@ class Git(LazyMixin): # 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 |