@@ -39,7 +39,7 @@ |
||
39 | 39 | ] |
40 | 40 | ); |
41 | 41 | |
42 | - $install = new Disable($resolver); |
|
42 | + $install = new Disable($resolver); |
|
43 | 43 | $install->setIO(new NullIO()); |
44 | 44 | $install->run($input, $output); |
45 | 45 | } |
@@ -55,7 +55,7 @@ |
||
55 | 55 | null, |
56 | 56 | ['captainhook.json' => file_get_contents(CH_PATH_FILES . '/config/valid.json')] |
57 | 57 | ); |
58 | - $input = new ArrayInput([ |
|
58 | + $input = new ArrayInput([ |
|
59 | 59 | 'hook' => 'pre-push', |
60 | 60 | '--configuration' => $fakeConfig->url() . '/captainhook.json', |
61 | 61 | ]); |
@@ -41,49 +41,49 @@ discard block |
||
41 | 41 | { |
42 | 42 | parent::configure(); |
43 | 43 | $this->setName('install') |
44 | - ->setDescription('Install git hooks') |
|
45 | - ->setHelp('This command will install the git hooks to your .git directory') |
|
46 | - ->addArgument( |
|
47 | - 'hook', |
|
48 | - InputArgument::OPTIONAL, |
|
49 | - 'Limit the hook you want to install. By default all hooks get installed.' |
|
50 | - ) |
|
51 | - ->addOption( |
|
52 | - 'force', |
|
53 | - 'f', |
|
54 | - InputOption::VALUE_NONE, |
|
55 | - 'Force install without confirmation' |
|
56 | - ) |
|
57 | - ->addOption( |
|
58 | - 'skip-existing', |
|
59 | - 's', |
|
60 | - InputOption::VALUE_NONE, |
|
61 | - 'Do not overwrite existing hooks' |
|
62 | - ) |
|
63 | - ->addOption( |
|
64 | - 'bootstrap', |
|
65 | - 'b', |
|
66 | - InputOption::VALUE_OPTIONAL, |
|
67 | - 'Path to composers vendor/autoload.php' |
|
68 | - ) |
|
69 | - ->addOption( |
|
70 | - 'run-mode', |
|
71 | - 'm', |
|
72 | - InputOption::VALUE_OPTIONAL, |
|
73 | - 'Git hook run mode [php|shell|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 \'/usr/bin/captainhook\'' |
|
86 | - ); |
|
44 | + ->setDescription('Install git hooks') |
|
45 | + ->setHelp('This command will install the git hooks to your .git directory') |
|
46 | + ->addArgument( |
|
47 | + 'hook', |
|
48 | + InputArgument::OPTIONAL, |
|
49 | + 'Limit the hook you want to install. By default all hooks get installed.' |
|
50 | + ) |
|
51 | + ->addOption( |
|
52 | + 'force', |
|
53 | + 'f', |
|
54 | + InputOption::VALUE_NONE, |
|
55 | + 'Force install without confirmation' |
|
56 | + ) |
|
57 | + ->addOption( |
|
58 | + 'skip-existing', |
|
59 | + 's', |
|
60 | + InputOption::VALUE_NONE, |
|
61 | + 'Do not overwrite existing hooks' |
|
62 | + ) |
|
63 | + ->addOption( |
|
64 | + 'bootstrap', |
|
65 | + 'b', |
|
66 | + InputOption::VALUE_OPTIONAL, |
|
67 | + 'Path to composers vendor/autoload.php' |
|
68 | + ) |
|
69 | + ->addOption( |
|
70 | + 'run-mode', |
|
71 | + 'm', |
|
72 | + InputOption::VALUE_OPTIONAL, |
|
73 | + 'Git hook run mode [php|shell|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 \'/usr/bin/captainhook\'' |
|
86 | + ); |
|
87 | 87 | } |
88 | 88 | |
89 | 89 | /** |
@@ -110,9 +110,9 @@ discard block |
||
110 | 110 | $template = Template\Builder::build($config, $repo, $this->executablePath(), $this->resolver->isPharRelease()); |
111 | 111 | $installer = new Installer($io, $config, $repo, $template); |
112 | 112 | $installer->setForce(IOUtil::argToBool($input->getOption('force'))) |
113 | - ->setSkipExisting(IOUtil::argToBool($input->getOption('skip-existing'))) |
|
114 | - ->setHook(IOUtil::argToString($input->getArgument('hook'))) |
|
115 | - ->run(); |
|
113 | + ->setSkipExisting(IOUtil::argToBool($input->getOption('skip-existing'))) |
|
114 | + ->setHook(IOUtil::argToString($input->getArgument('hook'))) |
|
115 | + ->run(); |
|
116 | 116 | |
117 | 117 | return 0; |
118 | 118 | } |
@@ -37,17 +37,17 @@ discard block |
||
37 | 37 | { |
38 | 38 | parent::configure(); |
39 | 39 | $this->setName('configure') |
40 | - ->setDescription('Configure your hooks') |
|
41 | - ->setHelp('This command creates or updates your captainhook configuration') |
|
42 | - ->addOption('extend', 'e', InputOption::VALUE_NONE, 'Extend existing configuration file') |
|
43 | - ->addOption('force', 'f', InputOption::VALUE_NONE, 'Overwrite existing configuration file') |
|
44 | - ->addOption('advanced', 'a', InputOption::VALUE_NONE, 'More options, but more to type') |
|
45 | - ->addOption( |
|
46 | - 'bootstrap', |
|
47 | - null, |
|
48 | - InputOption::VALUE_OPTIONAL, |
|
49 | - 'Path to composers vendor/autoload.php' |
|
50 | - ); |
|
40 | + ->setDescription('Configure your hooks') |
|
41 | + ->setHelp('This command creates or updates your captainhook configuration') |
|
42 | + ->addOption('extend', 'e', InputOption::VALUE_NONE, 'Extend existing configuration file') |
|
43 | + ->addOption('force', 'f', InputOption::VALUE_NONE, 'Overwrite existing configuration file') |
|
44 | + ->addOption('advanced', 'a', InputOption::VALUE_NONE, 'More options, but more to type') |
|
45 | + ->addOption( |
|
46 | + 'bootstrap', |
|
47 | + null, |
|
48 | + InputOption::VALUE_OPTIONAL, |
|
49 | + 'Path to composers vendor/autoload.php' |
|
50 | + ); |
|
51 | 51 | } |
52 | 52 | |
53 | 53 | /** |
@@ -65,10 +65,10 @@ discard block |
||
65 | 65 | |
66 | 66 | $configurator = new Creator($io, $config); |
67 | 67 | $configurator->force(IOUtil::argToBool($input->getOption('force'))) |
68 | - ->extend(IOUtil::argToBool($input->getOption('extend'))) |
|
69 | - ->advanced(IOUtil::argToBool($input->getOption('advanced'))) |
|
70 | - ->setExecutable($this->resolver->getExecutable()) |
|
71 | - ->run(); |
|
68 | + ->extend(IOUtil::argToBool($input->getOption('extend'))) |
|
69 | + ->advanced(IOUtil::argToBool($input->getOption('advanced'))) |
|
70 | + ->setExecutable($this->resolver->getExecutable()) |
|
71 | + ->run(); |
|
72 | 72 | return 0; |
73 | 73 | } |
74 | 74 | } |