authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2018-04-15 15:22:07-04:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2018-04-15 15:22:07-04:00
loga8d794215e5031d60c5bd761a2478f382972bde6
treeec69e0bf999320dfbed3725820d4332bdbd1bfd0
parentb5459eb987d89c4759c31123a7baa0a0d962c024

exit with error code instead of panic for file not found


1 files changed, 2 insertions(+), 1 deletions(-)

src/codegen.cpp+2-1
......@@ -6337,7 +6337,8 @@ static void define_builtin_compile_vars(CodeGen *g) {
63376337 int err;
63386338 Buf *abs_full_path = buf_alloc();
63396339 if ((err = os_path_real(builtin_zig_path, abs_full_path))) {
6340 zig_panic("unable to open '%s': %s", buf_ptr(builtin_zig_path), err_str(err));
6340 fprintf(stderr, "unable to open '%s': %s", buf_ptr(builtin_zig_path), err_str(err));
6341 exit(1);
63416342 }
63426343
63436344 assert(g->root_package);