X-Git-Url: https://git.madduck.net/etc/vim.git/blobdiff_plain/ff6bbd5d960ef0053b20c9d9c621c8a348980833..de510478d9b12490eddf93a785494f726897363b:/src/black_primer/lib.py?ds=sidebyside diff --git a/src/black_primer/lib.py b/src/black_primer/lib.py index afeb072..c306981 100644 --- a/src/black_primer/lib.py +++ b/src/black_primer/lib.py @@ -21,7 +21,7 @@ import click WINDOWS = system() == "Windows" BLACK_BINARY = "black.exe" if WINDOWS else "black" -GIT_BIANRY = "git.exe" if WINDOWS else "git" +GIT_BINARY = "git.exe" if WINDOWS else "git" LOG = logging.getLogger(__name__) @@ -59,10 +59,12 @@ async def _gen_check_output( raise if process.returncode != 0: + returncode = process.returncode + if returncode is None: + returncode = 69 + cmd_str = " ".join(cmd) - raise CalledProcessError( - process.returncode, cmd_str, output=stdout, stderr=stderr - ) + raise CalledProcessError(returncode, cmd_str, output=stdout, stderr=stderr) return (stdout, stderr) @@ -158,7 +160,7 @@ async def git_checkout_or_rebase( depth: int = 1, ) -> Optional[Path]: """git Clone project or rebase""" - git_bin = str(which(GIT_BIANRY)) + git_bin = str(which(GIT_BINARY)) if not git_bin: LOG.error("No git binary found") return None