@@ -38,52 +38,52 @@ discard block |
||
38 | 38 | protected function configure() : void |
39 | 39 | { |
40 | 40 | $this->setName('install') |
41 | - ->setDescription('Install git hooks') |
|
42 | - ->setHelp('This command will install the git hooks to your .git directory') |
|
43 | - ->addArgument('hook', InputArgument::OPTIONAL, 'Hook you want to install') |
|
44 | - ->addOption( |
|
45 | - 'configuration', |
|
46 | - 'c', |
|
47 | - InputOption::VALUE_OPTIONAL, |
|
48 | - 'Path to your json configuration', |
|
49 | - getcwd() . DIRECTORY_SEPARATOR . CH::CONFIG |
|
50 | - ) |
|
51 | - ->addOption( |
|
52 | - 'force', |
|
53 | - 'f', |
|
54 | - InputOption::VALUE_NONE, |
|
55 | - 'Force to overwrite existing hooks' |
|
56 | - ) |
|
57 | - ->addOption( |
|
58 | - 'git-directory', |
|
59 | - 'g', |
|
60 | - InputOption::VALUE_OPTIONAL, |
|
61 | - 'Path to your .git directory' |
|
62 | - ) |
|
63 | - ->addOption( |
|
64 | - 'vendor-directory', |
|
65 | - null, |
|
66 | - InputOption::VALUE_OPTIONAL, |
|
67 | - 'Path to composers vendor directory' |
|
68 | - ) |
|
69 | - ->addOption( |
|
70 | - 'run-mode', |
|
71 | - 'm', |
|
72 | - InputOption::VALUE_OPTIONAL, |
|
73 | - 'Git hook run mode [local|docker]' |
|
74 | - ) |
|
75 | - ->addOption( |
|
76 | - 'run-exec', |
|
77 | - 'e', |
|
78 | - InputOption::VALUE_OPTIONAL, |
|
79 | - 'The Docker command to start your container e.g. \'docker exec CONTAINER\'' |
|
80 | - ) |
|
81 | - ->addOption( |
|
82 | - 'run-path', |
|
83 | - 'p', |
|
84 | - InputOption::VALUE_OPTIONAL, |
|
85 | - 'The path to the CaptainHook executable \'/var/www/html\'' |
|
86 | - ); |
|
41 | + ->setDescription('Install git hooks') |
|
42 | + ->setHelp('This command will install the git hooks to your .git directory') |
|
43 | + ->addArgument('hook', InputArgument::OPTIONAL, 'Hook you want to install') |
|
44 | + ->addOption( |
|
45 | + 'configuration', |
|
46 | + 'c', |
|
47 | + InputOption::VALUE_OPTIONAL, |
|
48 | + 'Path to your json configuration', |
|
49 | + getcwd() . DIRECTORY_SEPARATOR . CH::CONFIG |
|
50 | + ) |
|
51 | + ->addOption( |
|
52 | + 'force', |
|
53 | + 'f', |
|
54 | + InputOption::VALUE_NONE, |
|
55 | + 'Force to overwrite existing hooks' |
|
56 | + ) |
|
57 | + ->addOption( |
|
58 | + 'git-directory', |
|
59 | + 'g', |
|
60 | + InputOption::VALUE_OPTIONAL, |
|
61 | + 'Path to your .git directory' |
|
62 | + ) |
|
63 | + ->addOption( |
|
64 | + 'vendor-directory', |
|
65 | + null, |
|
66 | + InputOption::VALUE_OPTIONAL, |
|
67 | + 'Path to composers vendor directory' |
|
68 | + ) |
|
69 | + ->addOption( |
|
70 | + 'run-mode', |
|
71 | + 'm', |
|
72 | + InputOption::VALUE_OPTIONAL, |
|
73 | + 'Git hook run mode [local|docker]' |
|
74 | + ) |
|
75 | + ->addOption( |
|
76 | + 'run-exec', |
|
77 | + 'e', |
|
78 | + InputOption::VALUE_OPTIONAL, |
|
79 | + 'The Docker command to start your container e.g. \'docker exec CONTAINER\'' |
|
80 | + ) |
|
81 | + ->addOption( |
|
82 | + 'run-path', |
|
83 | + 'p', |
|
84 | + InputOption::VALUE_OPTIONAL, |
|
85 | + 'The path to the CaptainHook executable \'/var/www/html\'' |
|
86 | + ); |
|
87 | 87 | } |
88 | 88 | |
89 | 89 | /** |
@@ -115,9 +115,9 @@ discard block |
||
115 | 115 | |
116 | 116 | $installer = new Installer($io, $config, $repo); |
117 | 117 | $installer->setForce(IOUtil::argToBool($input->getOption('force'))) |
118 | - ->setHook(IOUtil::argToString($input->getArgument('hook'))) |
|
119 | - ->setTemplate(Template\Builder::build($config, $repo)) |
|
120 | - ->run(); |
|
118 | + ->setHook(IOUtil::argToString($input->getArgument('hook'))) |
|
119 | + ->setTemplate(Template\Builder::build($config, $repo)) |
|
120 | + ->run(); |
|
121 | 121 | |
122 | 122 | return 0; |
123 | 123 | } |
@@ -150,8 +150,8 @@ |
||
150 | 150 | [ |
151 | 151 | '', |
152 | 152 | IOUtil::getLineSeparator(8) |
153 | - . ' Error details: <comment>Exception</comment> ' |
|
154 | - . IOUtil::getLineSeparator(46), |
|
153 | + . ' Error details: <comment>Exception</comment> ' |
|
154 | + . IOUtil::getLineSeparator(46), |
|
155 | 155 | $e->getMessage(), |
156 | 156 | '' |
157 | 157 | ] |