Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Jan 31, 2024
1 parent b511eaa commit 8d2f6e1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/pipx/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ def run_subprocess(
# symlink in argv[0] so that it can locate the venv.
if not os.path.islink(cmd_str_list[0]) and WINDOWS:
cmd_str_list[0] = os.path.realpath(cmd_str_list[0])

# TODO: Switch to using `-P` / PYTHONSAFEPATH instead of running in
# separate directory in Python 3.11
completed_process = subprocess.run(
Expand Down
8 changes: 2 additions & 6 deletions src/pipx/venv.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,9 +157,7 @@ def create_venv(self, venv_args: List[str], pip_args: List[str], override_shared
cmd = [self.python, "-m", "venv"]
if not override_shared:
cmd.append("--without-pip")
venv_process = run_subprocess(
cmd + venv_args + [str(self.root)], run_dir=str(self.root)
)
venv_process = run_subprocess(cmd + venv_args + [str(self.root)], run_dir=str(self.root))
subprocess_post_check(venv_process)

shared_libs.create(self.verbose)
Expand Down Expand Up @@ -250,9 +248,7 @@ def install_package(
]
# no logging because any errors will be specially logged by
# subprocess_post_check_handle_pip_error()
pip_process = run_subprocess(
cmd, log_stdout=False, log_stderr=False, run_dir=str(self.root)
)
pip_process = run_subprocess(cmd, log_stdout=False, log_stderr=False, run_dir=str(self.root))
subprocess_post_check_handle_pip_error(pip_process)
if pip_process.returncode:
raise PipxError(f"Error installing {full_package_description(package_name, package_or_url)}.")
Expand Down

0 comments on commit 8d2f6e1

Please sign in to comment.