diff options
| author | 2025-03-14 10:14:17 +0330 | |
|---|---|---|
| committer | 2025-03-14 10:14:17 +0330 | |
| commit | a1d54dd8b69c1731e0bd4229a4af0d83b5e330d3 (patch) | |
| tree | 55ac881136a9bcb5055eb5a3260e7ba6a7f5504c | |
| parent | Moved unnecessary files to local. (diff) | |
Error checking.
| -rw-r--r-- | build.c | 10 |
1 files changed, 7 insertions, 3 deletions
@@ -172,11 +172,15 @@ int system(const char *command) { return status; } -int run(const char *command) { +void run(const char *command) { staputs("> "); puts(command); staputs("\n"); - return system(command); + int status = system(command); + if (status != 0) { + staputs("** Builder encountered error. Exiting with respective code. **\n"); + exit(status); + } } __attribute__((diagnose_as_builtin(__builtin_memcpy, 1, 2, 3))) void * @@ -320,7 +324,7 @@ void run_dep_macro(char *name) { self[ sizeof(self) - 1 ] = '\0'; run("rm -f moonshine.expander.h"); - system(self); + run(self); } unsigned char install_ran = 0; |
