mirror of
https://github.com/deployphp/deployer.git
synced 2025-02-24 01:02:24 +01:00
Refactor init command.
This commit is contained in:
parent
d00f5855f6
commit
37bc2cd1e8
@ -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');
|
||||
|
||||
|
@ -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
|
||||
));
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user