fix pgrep check
authorAlan <alan@roojs.com>
Tue, 11 Jul 2023 09:04:17 +0000 (17:04 +0800)
committerAlan <alan@roojs.com>
Tue, 11 Jul 2023 09:04:17 +0000 (17:04 +0800)
JsCompile.php

index 050f46a..9025334 100644 (file)
@@ -255,8 +255,14 @@ class Pman_Core_JsCompile  extends Pman
         
         
         $pg = System::which('pgrep');
+        if ($pg == '') {
+            echo '<!--  install pgrep -->';
+            return false;
+        }
+        
         $cmd = "$pg roojspacker";
-        $out = trim(`$cmd`);
+        $res = `$cmd`;
+        $out = trim($res);
         if (strlen($out) > 0) {
             echo '<!--  onther process is compiling compile. -->';
             return false;