소스 검색

Adaptation mysh

Loquicom 6 년 전
부모
커밋
a8ffd085b2
1개의 변경된 파일4개의 추가작업 그리고 1개의 파일을 삭제
  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];