Skip to content

Commit

Permalink
fix(console.commands.command.Command): restore the set_poetry instanc…
Browse files Browse the repository at this point in the history
…e method, removed in Poetry v2
  • Loading branch information
DavidVujic authored and abn committed Jan 7, 2025
1 parent d3b6ba0 commit 781b4c2
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/poetry/console/commands/command.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,14 @@ def poetry(self) -> Poetry:

return self._poetry

def set_poetry(self, poetry: Poetry) -> None:
"""Explicitly set the current Poetry.
Useful for Plugins that extends the features of a Poetry CLI Command.
"""

self._poetry = poetry

def get_application(self) -> Application:
from poetry.console.application import Application

Expand Down

0 comments on commit 781b4c2

Please sign in to comment.