|
@@ -210,34 +210,7 @@ class maj {
|
|
|
return FALSE;
|
|
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(){
|
|
public static function bashFetch(){
|
|
|
$output = NULL;
|
|
$output = NULL;
|
|
|
$retval = NULL;
|
|
$retval = NULL;
|
|
@@ -246,7 +219,8 @@ class maj {
|
|
|
|
|
|
|
|
if(is_file($bash)){
|
|
if(is_file($bash)){
|
|
|
try {
|
|
try {
|
|
|
- exec("bash " .$bash, $output, $retval);
|
|
|
|
|
|
|
+ // Exécution du script avec redirection des erreurs
|
|
|
|
|
+ exec("bash " . $bash . " 2>&1", $output, $retval);
|
|
|
} catch (\Throwable $th) {
|
|
} catch (\Throwable $th) {
|
|
|
alert::recError("ERROR : " . $bash);
|
|
alert::recError("ERROR : " . $bash);
|
|
|
return FALSE;
|
|
return FALSE;
|