/** * Execute this command * * @inheritdoc */ protected function execute(InputInterface $input, OutputInterface $output) { $targetDirectory = $input->getArgument(self::TARGET_DIR_ARGUMENT); $exists = $this->vimConfigurationExists($targetDirectory); if ($exists) { $helper = $this->getHelper('question'); $question = new ConfirmationQuestion(sprintf('<info>It appears, that vim configuration already exists in "%s" directory, should I override this configuration?</info> <comment>[Y/N=default]</comment>', $targetDirectory), false); if (!$helper->ask($input, $output, $question)) { $output->writeln(sprintf('Installation has been canceled! ')); return; } } if (!$this->hasGit()) { $output->writeln('<comment>Git is not installed on Your OS. Installation failed!</comment>'); return; } else { $output->writeln('<info>Started Installing!</info>'); $this->mirror(PathHelper::getVimConfigPath(), $targetDirectory, $exists); $this->cloneVimPluginManager($targetDirectory); } $output->writeln(sprintf('<comment>%s</comment> installed into directory: <info>%s</info>', 'Vim configuration', $targetDirectory)); }