Commit cdda1393 by Sébastien Eustace

Add possibility to update specific packages

parent 408eef79
......@@ -10,20 +10,24 @@ class UpdateCommand(Command):
update
{ packages?* : The packages to update. }
{ --f|features=* : Features to install. }
{ --no-dev : Do not install dev dependencies. }
{ --dry-run : Outputs the operations but will not execute anything
(implicitly enables --verbose). }
"""
def handle(self):
packages = self.argument('packages')
installer = Installer(
self.output,
self.poetry.package,
self.poetry.locker,
PyPiRepository()
self.poetry.repository
)
if packages:
installer.whitelist({name: '*' for name in packages})
installer.dev_mode(not self.option('no-dev'))
installer.dry_run(self.option('dry-run'))
......
......@@ -227,7 +227,7 @@ class Installer:
self._installer.install(operation.package)
def _execute_update(self, operation: Update) -> None:
source = operation.target_package
source = operation.initial_package
target = operation.target_package
if self._execute_operations or self.is_dry_run():
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment