building before running when the project has not been built

This commit is contained in:
Odweta
2023-12-27 16:16:23 +01:00
parent d5802dd341
commit 51d046e790
+3 -2
View File
@@ -1,4 +1,5 @@
#include "../include/run.h" #include "../include/run.h"
#include "../include/build.h"
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
@@ -24,7 +25,7 @@ void run_project() {
system("make run"); system("make run");
} else { } else {
// file does not exist => project has not been built // file does not exist => project has not been built
printf("Project not yet built. Build it first with 'vendetta build'.\n"); build_project();
exit(1); run_project();
} }
} }