2
0
stany.ferer 1 жил өмнө
parent
commit
b8d17691a6
1 өөрчлөгдсөн 2 нэмэгдсэн , 28 устгасан
  1. 2 28
      core/class/maj.class.php

+ 2 - 28
core/class/maj.class.php

@@ -210,34 +210,7 @@ class maj {
             return FALSE;
         }
     }
-    
-/*
-    public static function bashMaj(){
-        $output = NULL;
-        $retval = NULL;
-        $bash = DIR_MAJ . MAJ . ".sh";
-        $error = 0;
 
-        if(is_file($bash)){
-            try {
-                exec("bash " .$bash, $output, $retval);
-                foreach ($output as $value) {
-                    self::print($value, self::$colorLineGrey);
-                    if(git::checkError($value) == TRUE){
-                        $error = 1;
-                    }
-                }
-            } catch (\Throwable $th) {
-                self::print("ERROR : " . $bash, self::$colorLineRed);
-                return FALSE;
-            }
-            return ($error == 0)? TRUE : FALSE;
-        } else {
-            self::print("ERROR : " . $bash . " not found", self::$colorLineRed);
-            return FALSE;
-        }
-    }
-*/
     public static function bashFetch(){
         $output = NULL;
         $retval = NULL;
@@ -246,7 +219,8 @@ class maj {
 
         if(is_file($bash)){
             try {
-                exec("bash " .$bash, $output, $retval);
+                // Exécution du script avec redirection des erreurs
+                exec("bash " . $bash . " 2>&1", $output, $retval);
             } catch (\Throwable $th) {
                 alert::recError("ERROR : " . $bash);
                 return FALSE;