diff --git a/src/Console/InitCommand.php b/src/Console/InitCommand.php index d45713d0..e2a14159 100644 --- a/src/Console/InitCommand.php +++ b/src/Console/InitCommand.php @@ -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'); diff --git a/src/Initializer/Initializer.php b/src/Initializer/Initializer.php index 01877890..ea7a7673 100644 --- a/src/Initializer/Initializer.php +++ b/src/Initializer/Initializer.php @@ -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 )); }