Skip to content

Commit 403f949

Browse files
committed
outputs 'env activate' verbose message on stderr
1 parent 5129ce4 commit 403f949

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

src/poetry/console/application.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -581,7 +581,7 @@ def configure_env(self, event: Event, event_name: str, _: EventDispatcher) -> No
581581
env = env_manager.create_venv()
582582

583583
if env.is_venv() and io.is_verbose():
584-
io.write_line(f"Using virtualenv: <comment>{env.path}</>")
584+
io.write_error_line(f"Using virtualenv: <comment>{env.path}</>")
585585

586586
command.set_env(env)
587587

tests/console/commands/test_run.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,10 @@ def test_run_passes_args_after_run_before_command_name_conflict(
9191
path.rename(path.parent / "run")
9292

9393
app_tester.execute(f"{args} python -V", decorated=True)
94-
assert app_tester.io.fetch_error() == ""
94+
assert (
95+
app_tester.io.remove_format(app_tester.io.fetch_error())
96+
== f"Using virtualenv: {env.path}\n"
97+
)
9598
assert env.executed == [["python", "-V"]]
9699

97100

0 commit comments

Comments
 (0)