rabin 1 месяц назад
Родитель
Сommit
f8bea57d5d
1 измененных файлов с 3 добавлено и 2 удалено
  1. 3 2
      src/Dever/Helper/Cmd.php

+ 3 - 2
src/Dever/Helper/Cmd.php

@@ -43,6 +43,7 @@ class Cmd
         if ($daemon) {
             $shell .= ' 1>/dev/null 2>&1 &';
         }
+        //$shell = escapeshellcmd($shell);
         exec($shell, $output, $state);
         return array($state == 0, $output);
     }
@@ -60,7 +61,7 @@ class Cmd
         if ($count) {
             $shell .= ' | wc -l';
         }
-        $result = self::run($shell, false);
-        return $result;
+        $result = exec($shell, $output, $state);
+        return $count ? $output[0] : $output;
     }
 }