protected function runInstaller(RootPackageInterface $rootPackage, array $whitelistPackages): int
    {
        $this->io->writeError('Running an update to install dependent packages');

        $this->composer->setPackage($rootPackage);

        $installer = $this->getInstaller();
        $installer->setUpdateWhitelist($whitelistPackages);

        return $installer->run();
    }