@@ -143,6 +143,10 @@ private function displaySettings(): void
143143 $ this ->io ->write (' - <fg=cyan>Git directory:</fg=cyan> ' . $ this ->config ->getGitDirectory ());
144144 $ this ->io ->write (' - <fg=cyan>Bootstrap file:</fg=cyan> ' . $ this ->config ->getBootstrap ());
145145 $ this ->io ->write (' - <fg=cyan>Install mode:</fg=cyan> ' . $ this ->config ->getRunConfig ()->getMode ());
146+
147+ $ this ->displayCustomSettings ();
148+ $ this ->displayRunSettings ();
149+ $ this ->displayPluginSettings ();
146150 }
147151
148152 /**
@@ -207,10 +211,11 @@ private function displayAction(Config\Action $action): void
207211 /**
208212 * Display all options
209213 *
210- * @param \CaptainHook\App\Config\Options $options
214+ * @param \CaptainHook\App\Config\Options $options
215+ * @param string $prefix
211216 * @return void
212217 */
213- private function displayOptions (Config \Options $ options ): void
218+ private function displayOptions (Config \Options $ options, string $ prefix = '' ): void
214219 {
215220 if (empty ($ options ->getAll ())) {
216221 return ;
@@ -219,9 +224,9 @@ private function displayOptions(Config\Options $options): void
219224 return ;
220225 }
221226
222- $ this ->io ->write (' <comment>Options:</comment> ' );
227+ $ this ->io ->write ($ prefix . ' <comment>Options:</comment> ' );
223228 foreach ($ options ->getAll () as $ key => $ value ) {
224- $ this ->displayOption ($ key , $ value );
229+ $ this ->displayOption ($ key , $ value, $ prefix );
225230 }
226231 }
227232
@@ -357,4 +362,54 @@ private function yesOrNo(bool $bool): string
357362 {
358363 return $ bool ? '✅ ' : '❌ ' ;
359364 }
365+
366+ /**
367+ * Display custom config settings
368+ *
369+ * @return void
370+ */
371+ private function displayCustomSettings (): void
372+ {
373+ if (count ($ this ->config ->getCustomSettings ()) === 0 ) {
374+ return ;
375+ }
376+
377+ $ this ->io ->write (' <fg=yellow>Custom Settings:</> ' );
378+ foreach ($ this ->config ->getCustomSettings () as $ key => $ value ) {
379+ $ this ->io ->write (' - <fg=cyan> ' . $ key . '</>: ' . $ value );
380+ }
381+ }
382+
383+ /**
384+ * Display run config settings
385+ *
386+ * @return void
387+ */
388+ private function displayRunSettings (): void
389+ {
390+ $ runConfig = $ this ->config ->getRunConfig ();
391+ $ this ->io ->write (' <fg=yellow>Run Settings:</> ' );
392+ $ this ->io ->write (' - <fg=cyan>mode</>: ' . $ runConfig ->getMode ());
393+ $ this ->io ->write (' - <fg=cyan>docker-command</>: ' . $ runConfig ->getDockerCommand ());
394+ $ this ->io ->write (' - <fg=cyan>path-captain</>: ' . $ runConfig ->getCaptainsPath ());
395+ $ this ->io ->write (' - <fg=cyan>path-git</>: ' . $ runConfig ->getGitPath ());
396+ }
397+
398+ /**
399+ * Display plugin settings
400+ *
401+ * @return void
402+ */
403+ private function displayPluginSettings (): void
404+ {
405+ $ plugins = $ this ->config ->getPlugins ();
406+ if (count ($ plugins ) === 0 ) {
407+ return ;
408+ }
409+ $ this ->io ->write (' <fg=magenta>Plugins:</> ' );
410+ foreach ($ plugins as $ plugin ) {
411+ $ this ->io ->write (' - <fg=cyan> ' . $ plugin ->getPlugin () . '</> ' );
412+ $ this ->displayOptions ($ plugin ->getOptions (), ' ' );
413+ }
414+ }
360415}
0 commit comments