Skip to content

Commit

Permalink
add flag --use-env to specify the python executable to use
Browse files Browse the repository at this point in the history
  • Loading branch information
finswimmer committed Jun 14, 2021
1 parent 925429f commit 9a6e18d
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion poetry/console/application.py
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ def configure_env(
poetry = command.poetry

env_manager = EnvManager(poetry)
env = env_manager.create_venv(io)
env = env_manager.create_venv(io, executable=event.io.input.option("use-env"))

if env.is_venv() and io.is_verbose():
io.write_line(f"Using virtualenv: <comment>{env.path}</>")
Expand Down Expand Up @@ -327,6 +327,11 @@ def _default_definition(self) -> "Definition":
definition.add_option(
Option("--no-plugins", flag=True, description="Disables plugins.")
)
definition.add_option(
Option(
"--use-env", flag=False, description="The python executable to use."
),
)

return definition

Expand Down

0 comments on commit 9a6e18d

Please sign in to comment.