diff --git a/src/pipupgrade/_pip.py b/src/pipupgrade/_pip.py index a765db7..23f100e 100644 --- a/src/pipupgrade/_pip.py +++ b/src/pipupgrade/_pip.py @@ -43,9 +43,9 @@ def _get_pip_executable(multiple = False): exec_ = which(pip_) if exec_: if not multiple: - return exec_ + return '"' + exec_ + '"' else: - exec_ = osp.realpath(exec_) + exec_ = '"' + osp.realpath(exec_) + '"' if exec_ not in execs: execs.append(exec_) diff --git a/src/pipupgrade/commands/__init__.py b/src/pipupgrade/commands/__init__.py index 0bcd1ad..4e2b53a 100644 --- a/src/pipupgrade/commands/__init__.py +++ b/src/pipupgrade/commands/__init__.py @@ -144,7 +144,7 @@ def _command(*args, **kwargs): cli.echo(cli_format("Checking...", cli.YELLOW), file = file_) pip_path = a.pip_path or [ ] - pip_path = [which(p) for p in pip_path] or _pip._PIP_EXECUTABLES + pip_path = ['"' + which(p) + '"' for p in pip_path] or _pip._PIP_EXECUTABLES logger.info("`pip` executables found: %s" % pip_path)