Skip to content

Commit 37bc2cd

Browse files
committed
Refactor init command.
1 parent d00f585 commit 37bc2cd

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/Console/InitCommand.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ protected function configure()
6161
$this
6262
->setName('init')
6363
->setDescription('Initialize deployer system in your project')
64-
->addArgument('template', InputArgument::OPTIONAL, 'The template of you project. Available templates: ' . implode(', ', $this->availableTemplates))
64+
->addOption('template', 't', InputOption::VALUE_OPTIONAL, 'The template of you project. Available templates: ' . implode(', ', $this->availableTemplates))
6565
->addOption('directory', null, InputOption::VALUE_OPTIONAL, 'The directory for create "deploy.php" file', getcwd())
6666
->addOption('filename', null, InputOption::VALUE_OPTIONAL, 'The file name. Default "deploy.php"', 'deploy.php');
6767
}
@@ -71,7 +71,7 @@ protected function configure()
7171
*/
7272
protected function execute(InputInterface $input, OutputInterface $output)
7373
{
74-
$template = $input->getArgument('template');
74+
$template = $input->getOption('template');
7575
$directory = $input->getOption('directory');
7676
$file = $input->getOption('filename');
7777

src/Initializer/Initializer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ private function checkFileBeforeInitialize($directory, $file)
126126

127127
if (file_exists($filePath)) {
128128
throw new IOException(sprintf(
129-
'Can not initialize deployer. The file "%s" already exist.',
129+
'The file "%s" already exist.',
130130
$filePath
131131
));
132132
}

0 commit comments

Comments
 (0)