Unverified Commit cdda1393 authored by Sébastien Eustace's avatar Sébastien Eustace
Browse files

Add possibility to update specific packages

parent 408eef79
Loading
Loading
Loading
Loading
+6 −2
Changes for poetry/console/commands/update.py: 6 added lines, 2 removed lines.
Original line number Diff line number Diff line
@@ -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'))

+1 −1
Changes for poetry/installation/installer.py: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -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():