File tree Expand file tree Collapse file tree 2 files changed +7
-4
lines changed
Runner/Action/Cli/Command/Placeholder Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Original file line number Diff line number Diff line change 1212namespace CaptainHook \App \Console \Command ;
1313
1414use CaptainHook \App \Config ;
15- use CaptainHook \App \Hook \Util ;
15+ use CaptainHook \App \Hook \Util as HookUtil ;
1616use CaptainHook \App \Runner \Bootstrap \Util as BootstrapUtil ;
17+ use CaptainHook \App \Runner \Util as RunnerUtil ;
1718use RuntimeException ;
1819use Symfony \Component \Console \Input \InputInterface ;
1920use Symfony \Component \Console \Input \InputOption ;
@@ -97,7 +98,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int
9798 try {
9899 $ this ->handleBootstrap ($ config );
99100
100- $ class = '\\CaptainHook \\App \\Runner \\Hook \\' . Util ::getHookCommand ($ this ->hookName );
101+ $ class = '\\CaptainHook \\App \\Runner \\Hook \\' . HookUtil ::getHookCommand ($ this ->hookName );
101102 /** @var \CaptainHook\App\Runner\Hook $hook */
102103 $ hook = new $ class ($ io , $ config , $ repository );
103104 $ hook ->setPluginsDisabled ($ input ->getOption ('no-plugins ' ));
@@ -148,7 +149,7 @@ private function handleBootstrap(Config $config): void
148149 private function shouldHooksBeSkipped (): bool
149150 {
150151 foreach (['CAPTAINHOOK_SKIP_HOOKS ' , 'CI ' ] as $ envVar ) {
151- $ skip = (int ) ( $ _SERVER [ $ envVar] ?? 0 );
152+ $ skip = (int ) RunnerUtil:: getEnv ( $ envVar, " 0 " );
152153 if ($ skip === 1 ) {
153154 return true ;
154155 }
Original file line number Diff line number Diff line change 1111
1212namespace CaptainHook \App \Runner \Action \Cli \Command \Placeholder ;
1313
14+ use CaptainHook \App \Runner \Util ;
15+
1416/**
1517 * Class Env
1618 *
@@ -36,6 +38,6 @@ public function replacement(array $options): string
3638 $ var = $ options ['value-of ' ];
3739 $ default = $ options ['default ' ] ?? '' ;
3840
39- return ( string ) ( $ _ENV [ $ var] ?? $ default );
41+ return Util:: getEnv ( $ var, $ default );
4042 }
4143}
You can’t perform that action at this time.
0 commit comments