File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11<?php
22
3+ use EE \Utils ;
4+ use EE \Model \Site ;
5+ use function EE \Site \Utils \auto_site_name ;
6+
37/**
48 * Brings up a shell to run wp-cli, composer etc.
59 *
1014 *
1115 * @package ee-cli
1216 */
13-
14- use EE \Utils ;
15- use EE \Model \Site ;
16- use function EE \Site \Utils \auto_site_name ;
17-
1817class Shell_Command extends EE_Command {
1918
2019 /**
@@ -26,6 +25,7 @@ class Shell_Command extends EE_Command {
2625 * : Name of website to run shell on.
2726 */
2827 public function __invoke ( $ args ) {
28+
2929 EE \Utils \delem_log ( 'ee shell start ' );
3030 $ args = auto_site_name ( $ args , 'shell ' , '' );
3131 $ site_name = EE \Utils \remove_trailing_slash ( $ args [0 ] );
@@ -49,6 +49,7 @@ public function __invoke( $args ) {
4949 * @param null|array $descriptors File descriptors for proc.
5050 */
5151 private function run ( $ cmd , $ descriptors = null ) {
52+
5253 EE \Utils \check_proc_available ( 'ee_shell ' );
5354 if ( ! $ descriptors ) {
5455 $ descriptors = array ( STDIN , STDOUT , STDERR );
@@ -81,5 +82,4 @@ private function check_shell_available( $shell_container, $site ) {
8182 EE ::error ( sprintf ( '%s site does not have support to launch %s shell. ' , $ shell_container , $ site ->site_url ) );
8283 }
8384 }
84-
8585}
You can’t perform that action at this time.
0 commit comments