protected function execute(InputInterface $input, OutputInterface $output)
	{
		$this->setupEnvironment('administrator', $input, $output);

		// Enable debug, so that JInstaller::install() throws exceptions on problems
		$this->joomla->setCfg('debug', 1);

		$installer = \JInstaller::getInstance();

		if ($installer->install($this->handleExtension($input, $output)))
		{
			$output->writeln($this->getExtensionInfo($installer));

			return 0;
		}
		else
		{
			$output->writeln('Installation failed due to unknown reason.');

			return 1;
		}
	}