Shopware\Install\Command\ShopwareInstallVcsCommand::askBranch PHP Method

askBranch() private method

private askBranch ( Symfony\Component\Console\Input\InputInterface $input, ShopwareCli\Services\IoService $ioService ) : string
$input Symfony\Component\Console\Input\InputInterface
$ioService ShopwareCli\Services\IoService
return string
    private function askBranch(InputInterface $input, IoService $ioService)
    {
        $branch = $input->getOption('branch');
        if (!$branch) {
            $branchSuggestion = self::MAIN_BRANCH;
            $branch = $ioService->ask("Please provide the branch you want to install <{$branchSuggestion}>: ");
            $branch = trim($branch) ? $branch : self::MAIN_BRANCH;
            $input->setOption('branch', $branch);
            return $branch;
        }
        return $branch;
    }