diff --git a/releasenotes.md b/releasenotes.md index 5ece4d41d..39a4f1759 100644 --- a/releasenotes.md +++ b/releasenotes.md @@ -40,6 +40,7 @@ - Incorrect nameof on nested struct names. #2492 - Issue not correctly aborting compilation on recursive generics. - Crash during codegen when taking the typeid of an empty enum with associated values. +- Assert when the binary doesn't get created and --run-once is used. #2502 ### Stdlib changes - Added generic `InterfaceList` to store a list of values that implement a specific interface diff --git a/src/compiler/compiler.c b/src/compiler/compiler.c index 24ab6df52..ea7c732fc 100644 --- a/src/compiler/compiler.c +++ b/src/compiler/compiler.c @@ -791,6 +791,10 @@ void compiler_compile(void) } name = scratch_buffer_to_string(); const char *full_path = realpath(scratch_buffer_to_string(), NULL); + if (!full_path) + { + error_exit("The binary '%s' was unexpectedly not found.", scratch_buffer_to_string()); + } OUTF("Launching %s", name); FOREACH(const char *, arg, compiler.build.args) {