File tree Expand file tree Collapse file tree 2 files changed +9
-4
lines changed Expand file tree Collapse file tree 2 files changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -482,11 +482,11 @@ public function init_logger() {
482482
483483 // Create the config directory if not exist for file logger to initialize.
484484 if ( ! is_dir ( EE_CONF_ROOT ) ) {
485- shell_exec ('sudo mkdir -p ' . EE_CONF_ROOT );
485+ shell_exec ('mkdir -p ' . EE_CONF_ROOT );
486486 }
487487
488488 if ( ! is_writable ( EE_CONF_ROOT ) ) {
489- EE ::err ( 'Please run `ee` with root privileges. ' );
489+ EE ::err ( 'Config root: ' . EE_CONF_ROOT . ' is not writable by EasyEngine ' );
490490 }
491491
492492 if ( !empty ( $ this ->arguments [0 ] ) && 'cli ' === $ this ->arguments [0 ] && ! empty ( $ this ->arguments [1 ] ) && 'info ' === $ this ->arguments [1 ] ) {
@@ -548,7 +548,7 @@ public function init_config() {
548548 array_unshift ( $ args , 'cli ' );
549549 unset( $ assoc_args ['version ' ] );
550550 }
551-
551+
552552 // ee3 backward compatibility to wp-cli flags
553553 $ wp_compat_array_map = array (
554554 'user ' => 'admin_user ' ,
@@ -624,7 +624,7 @@ private function ensure_present_in_config( $var, $default) {
624624 $ this ->add_var_to_config_file ( $ var , $ config_file_path );
625625 return ;
626626 }
627- EE ::err ("Please run `ee` with root privileges . " );
627+ EE ::err ("Configuration directory: $ config_dir_path is not writable by EasyEngine . " );
628628 }
629629 }
630630 }
Original file line number Diff line number Diff line change 11<?php
22
3+ if ( posix_geteuid () ) {
4+ echo "\033[1;31mError: \033[0m Please run `ee` with root privileges. " ;
5+ return ;
6+ }
7+
38// Can be used by plugins/themes to check if EE is running or not
49define ( 'EE ' , true );
510define ( 'EE_VERSION ' , trim ( file_get_contents ( EE_ROOT . '/VERSION ' ) ) );
You can’t perform that action at this time.
0 commit comments