diff --git a/src/Shell_Command.php b/src/Shell_Command.php index 4109277..942cadf 100644 --- a/src/Shell_Command.php +++ b/src/Shell_Command.php @@ -1,7 +1,8 @@ site_fs_path ); - $service = \EE\Utils\get_flag_value( $assoc_args, 'service' ); + $service = EE_Utils\get_flag_value( $assoc_args, 'service' ); $this->check_shell_available( $service, $site ); - $user = \EE\Utils\get_flag_value( $assoc_args, 'user' ); + $user = EE_Utils\get_flag_value( $assoc_args, 'user' ); $user_string = ''; if ( $user ) { $user_string = $this->check_user_available( $user, $service ) ? "--user='$user'" : ''; } $shell = ( 'mailhog' === $service ) ? 'sh' : 'bash'; - $command = \EE\Utils\get_flag_value( $assoc_args, 'command' ); + $command = EE_Utils\get_flag_value( $assoc_args, 'command' ); if ( $command ) { EE::exec( "docker-compose exec $user_string $service $shell -c \"$command\"", true, true ); } else { $this->run( "docker-compose exec $user_string $service $shell" ); } - EE\Utils\delem_log( 'ee shell end' ); + EE_Utils\delem_log( 'ee shell end' ); } /** @@ -91,13 +92,13 @@ public function __invoke( $args, $assoc_args ) { */ private function run( $cmd, $descriptors = null ) { - EE\Utils\check_proc_available( 'ee_shell' ); + EE_Utils\check_proc_available( 'ee_shell' ); if ( ! $descriptors ) { $descriptors = array( STDIN, STDOUT, STDERR ); } - $final_cmd = EE\Utils\force_env_on_nix_systems( $cmd ); - $proc = EE\Utils\proc_open_compat( $final_cmd, $descriptors, $pipes ); + $final_cmd = EE_Utils\force_env_on_nix_systems( $cmd ); + $proc = EE_Utils\proc_open_compat( $final_cmd, $descriptors, $pipes ); if ( ! $proc ) { exit( 1 ); }