File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1313}
1414
1515$ autoload = dirname ( __FILE__ ) . '/vendor/autoload.php ' ;
16+
1617if ( file_exists ( $ autoload ) ) {
1718 require_once $ autoload ;
1819}
1920
2021EE ::add_command ( 'admin-tools ' , 'Admin_Tools_Command ' );
21-
22-
23- EE ::add_hook ('before_invoke:admin-tools up ' , 'init_global_auth ' );
24-
25- /**
26- * Initialize global auth if it's not present.
27- *
28- * @throws \EE\ExitException
29- */
30- function init_global_auth () {
31- if ( ! is_array ( EE ::get_runner ()->find_command_to_run ( [ 'auth ' ] ) ) ) {
32- EE ::error ( 'Auth command needs to be registered for mailhog ' );
33- }
34-
35- EE ::run_command ( [ 'auth ' , 'init ' ] );
36- }
Original file line number Diff line number Diff line change 1111 * @package ee-cli
1212 */
1313
14+ use Composer \Console \Application ;
1415use EE \Model \Site ;
15- use \Symfony \Component \Filesystem \Filesystem ;
16- use \Composer \Console \Application ;
17- use \Symfony \Component \Console \Input \ArrayInput ;
16+ use Symfony \Component \Console \Input \ArrayInput ;
17+ use Symfony \Component \Filesystem \Filesystem ;
1818use function EE \Site \Utils \auto_site_name ;
1919
2020class Admin_Tools_Command extends EE_Command {
@@ -100,6 +100,8 @@ public function install() {
100100 */
101101 public function up ( $ args , $ assoc_args ) {
102102
103+ \EE \Auth \Utils \init_global_admin_tools_auth ();
104+
103105 EE \Utils \delem_log ( 'admin-tools ' . __FUNCTION__ . ' start ' );
104106 $ args = auto_site_name ( $ args , $ this ->command , __FUNCTION__ );
105107 $ force = EE \Utils \get_flag_value ( $ assoc_args , 'force ' );
You can’t perform that action at this time.
0 commit comments