Explorar el Código

Adaptation mysh

Loquicom hace 6 años
padre
commit
a8ffd085b2
Se han modificado 1 ficheros con 4 adiciones y 1 borrados
  1. 4 1
      mysh.c

+ 4 - 1
mysh.c

@@ -55,7 +55,10 @@ int main(int argc, char* argv[]) {
     }
     //Parse les commandes
     a = parse_all_command(&ct);
-    printf("Result : %d\n\n", a);
+    if(a == SHELL_FAIL){
+        serror("Erreur lors du parse des commandes");
+        exit(EXIT_FAILURE);
+    }
     //Affiche resultat
     for (int i = 0; i < ct.length; i++) {
         Command* c = ct.cmd[i];