Skip to content

Commit

Permalink
Fix TypeError in tests (#1117)
Browse files Browse the repository at this point in the history
  • Loading branch information
dukecat0 authored Dec 1, 2023
1 parent 18d6722 commit dea8c7a
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/pipx/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -181,10 +181,12 @@ def run_pipx_command(args: argparse.Namespace) -> ExitCode: # noqa: C901
logger.info(f"Virtual Environment location is {venv_dir}")
if "skip" in args:
skip_list = [canonicalize_name(x) for x in args.skip]
if "python" in args and not Path(args.python).is_file():
py_launcher_python = find_py_launcher_python(args.python)
if py_launcher_python:
args.python = py_launcher_python

if "python" in args:
if args.python is not None and not Path(args.python).is_file():
py_launcher_python = find_py_launcher_python(args.python)
if py_launcher_python:
args.python = py_launcher_python

if args.command == "run":
commands.run(
Expand Down

0 comments on commit dea8c7a

Please sign in to comment.