File tree Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -38,10 +38,16 @@ protected function configure(): void
3838 * @param OutputInterface $output
3939 * @return void
4040 */
41- protected function execute (InputInterface $ input , OutputInterface $ output ): void
41+ protected function execute (InputInterface $ input , OutputInterface $ output ): int
4242 {
43- $ output ->writeln (__ ("Disabling any admin accounts with 90 days of inactivity " ));
44- $ this ->disableInactiveAdminAccounts ->execute ();
45- $ output ->writeln (__ ("Disabling of accounts complete " ));
43+ try {
44+ $ output ->writeln (__ ("Disabling any admin accounts with 90 days of inactivity " ));
45+ $ this ->disableInactiveAdminAccounts ->execute ();
46+ $ output ->writeln (__ ("Disabling of accounts complete " ));
47+ return Command::SUCCESS ;
48+ } catch (\Throwable $ t ) {
49+ $ output ->writeln (__ ("<error>Error: {$ e ->getMessage ()}</error> " ));
50+ return Command::FAILURE ;
51+ }
4652 }
4753}
You can’t perform that action at this time.
0 commit comments