public function installDependencies($destination, array $dependencies, $global = false)
    {
        $success = true;
        foreach ($dependencies as $stack => $stackDependencies) {
            $manager = $this->getManager($stack);
            $this->output->writeln(sprintf(
                "Installing <info>%s</info> dependencies with '%s': %s",
                $stack,
                $manager->getCommandName(),
                implode(', ', array_keys($stackDependencies))
            ));
            if (!$manager->isAvailable()) {
                $this->output->writeln(sprintf(
                    "Cannot install <comment>%s</comment> dependencies: '%s' is not installed.",
                    $stack,
                    $manager->getCommandName()
                ));
                if ($manager->getInstallHelp()) {
                    $this->output->writeln($manager->getInstallHelp());
                }
                $success = false;
                continue;
            }
            $path = $destination . '/' . $stack;
            $this->ensureDirectory($path);
            $manager->install($path, $stackDependencies, $global);
        }

        return $success;
    }