src/Console/Command/InstallCommand.php
protected function execute(InputInterface $input, OutputInterface $output): int
    {
        $verboseOutput = false;
        if ($input->isInteractive() || $output->isVerbose()) {
            $verboseOutput = true;
        }

        $version = $input->getArgument('version'); // exact version could be specified as argument

        if (!$version) {
            $version = $this->askForVersion($input->isInteractive());
        }

        if ($verboseOutput) {
            $this->io->note(
                sprintf(
                    'Downloading Selenium standalone server version %s...%s',
                    $version,
                    (!(new CiDetector())->isCiDetected() ? ' Just for you <3!' : '')
                )
            );
        }

        $downloader = $this->getDownloader();
        $downloader->setVersion($version);
        $targetPath = realpath($downloader->getFilePath());

        if ($this->io->isVerbose()) {
            $this->io->note(sprintf('Download URL: %s', $downloader->getFileUrl()));
        }

        if ($downloader->isAlreadyDownloaded()) {
            if ($verboseOutput) {
                $this->io->note(
                    sprintf('File "%s" already exists - won\'t be downloaded again.', basename($targetPath))
                );

                $this->io->note('Path to file: ' . $targetPath);
                $this->printLinkToWiki();
            } else {
                $this->io->writeln($targetPath); // In non-verbose mode only output path to the file
            }

            return 0;
        }

        if ($verboseOutput) {
            $this->io->note('Downloading may take a while - its ~20 MB...');
        }

        $downloadedSize = $downloader->download();
        $downloadedFilePath = realpath($downloader->getFilePath());

        if ($verboseOutput) {
            $this->io->success(
                sprintf('Downloaded %d MB, file saved successfully.', round($downloadedSize / 1024 / 1024, 1))
            );
            $this->io->note('Path to file: ' . $downloadedFilePath);
            $this->printLinkToWiki();
        } else {
            $this->io->writeln($downloadedFilePath); // In non-verbose mode only output path to the file
        }

        return 0;
    }
protected function execute(InputInterface $input, OutputInterface $output): int
    {
        $verboseOutput = false;
        if ($input->isInteractive() || $output->isVerbose()) {
            $verboseOutput = true;
        }

        $version = $input->getArgument('version'); // exact version could be specified as argument

        if (!$version) {
            $version = $this->askForVersion($input->isInteractive());
        }

        if ($verboseOutput) {
            $this->io->note(
                sprintf(
                    'Downloading Selenium standalone server version %s...%s',
                    $version,
                    (!(new CiDetector())->isCiDetected() ? ' Just for you <3!' : '')
                )
            );
        }

        $downloader = $this->getDownloader();
        $downloader->setVersion($version);
        $targetPath = realpath($downloader->getFilePath());

        if ($this->io->isVerbose()) {
            $this->io->note(sprintf('Download URL: %s', $downloader->getFileUrl()));
        }

        if ($downloader->isAlreadyDownloaded()) {
            if ($verboseOutput) {
                $this->io->note(
                    sprintf('File "%s" already exists - won\'t be downloaded again.', basename($targetPath))
                );

                $this->io->note('Path to file: ' . $targetPath);
                $this->printLinkToWiki();
            } else {
                $this->io->writeln($targetPath); // In non-verbose mode only output path to the file
            }

            return 0;
        }

        if ($verboseOutput) {
            $this->io->note('Downloading may take a while - its ~20 MB...');
        }

        $downloadedSize = $downloader->download();
        $downloadedFilePath = realpath($downloader->getFilePath());

        if ($verboseOutput) {
            $this->io->success(
                sprintf('Downloaded %d MB, file saved successfully.', round($downloadedSize / 1024 / 1024, 1))
            );
            $this->io->note('Path to file: ' . $downloadedFilePath);
            $this->printLinkToWiki();
        } else {
            $this->io->writeln($downloadedFilePath); // In non-verbose mode only output path to the file
        }

        return 0;
    }
In interactive or very verbose (-vv) mode provide more output, otherwise only output full path to selenium
server jar file (so it could be parsed and run).