Skip to content

Commit

Permalink
exit with error code instead of panic for file not found
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewrk committed Apr 15, 2018
1 parent b5459eb commit a8d7942
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/codegen.cpp
Expand Up @@ -6337,7 +6337,8 @@ static void define_builtin_compile_vars(CodeGen *g) {
int err;
Buf *abs_full_path = buf_alloc();
if ((err = os_path_real(builtin_zig_path, abs_full_path))) {
zig_panic("unable to open '%s': %s", buf_ptr(builtin_zig_path), err_str(err));
fprintf(stderr, "unable to open '%s': %s", buf_ptr(builtin_zig_path), err_str(err));
exit(1);
}

assert(g->root_package);
Expand Down

0 comments on commit a8d7942

Please sign in to comment.