Commit cdda1393 by Sébastien Eustace

Add possibility to update specific packages

parent 408eef79
...@@ -10,20 +10,24 @@ class UpdateCommand(Command): ...@@ -10,20 +10,24 @@ class UpdateCommand(Command):
update update
{ packages?* : The packages to update. } { packages?* : The packages to update. }
{ --f|features=* : Features to install. }
{ --no-dev : Do not install dev dependencies. } { --no-dev : Do not install dev dependencies. }
{ --dry-run : Outputs the operations but will not execute anything { --dry-run : Outputs the operations but will not execute anything
(implicitly enables --verbose). } (implicitly enables --verbose). }
""" """
def handle(self): def handle(self):
packages = self.argument('packages')
installer = Installer( installer = Installer(
self.output, self.output,
self.poetry.package, self.poetry.package,
self.poetry.locker, 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.dev_mode(not self.option('no-dev'))
installer.dry_run(self.option('dry-run')) installer.dry_run(self.option('dry-run'))
......
...@@ -227,7 +227,7 @@ class Installer: ...@@ -227,7 +227,7 @@ class Installer:
self._installer.install(operation.package) self._installer.install(operation.package)
def _execute_update(self, operation: Update) -> None: def _execute_update(self, operation: Update) -> None:
source = operation.target_package source = operation.initial_package
target = operation.target_package target = operation.target_package
if self._execute_operations or self.is_dry_run(): 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