Refactor init command.

This commit is contained in:
Anton Medvedev 2016-11-19 15:50:17 +07:00
parent d00f5855f6
commit 37bc2cd1e8
2 changed files with 3 additions and 3 deletions

View File

@ -61,7 +61,7 @@ class InitCommand extends Command
$this
->setName('init')
->setDescription('Initialize deployer system in your project')
->addArgument('template', InputArgument::OPTIONAL, 'The template of you project. Available templates: ' . implode(', ', $this->availableTemplates))
->addOption('template', 't', InputOption::VALUE_OPTIONAL, 'The template of you project. Available templates: ' . implode(', ', $this->availableTemplates))
->addOption('directory', null, InputOption::VALUE_OPTIONAL, 'The directory for create "deploy.php" file', getcwd())
->addOption('filename', null, InputOption::VALUE_OPTIONAL, 'The file name. Default "deploy.php"', 'deploy.php');
}
@ -71,7 +71,7 @@ class InitCommand extends Command
*/
protected function execute(InputInterface $input, OutputInterface $output)
{
$template = $input->getArgument('template');
$template = $input->getOption('template');
$directory = $input->getOption('directory');
$file = $input->getOption('filename');

View File

@ -126,7 +126,7 @@ class Initializer
if (file_exists($filePath)) {
throw new IOException(sprintf(
'Can not initialize deployer. The file "%s" already exist.',
'The file "%s" already exist.',
$filePath
));
}