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) {...@@ -6337,7 +6337,8 @@ static void define_builtin_compile_vars(CodeGen *g) {
6337 int err;6337 int err;
6338 Buf *abs_full_path = buf_alloc();6338 Buf *abs_full_path = buf_alloc();
6339 if ((err = os_path_real(builtin_zig_path, abs_full_path))) {6339 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);
6341 }6342 }
63426343
6343 assert(g->root_package);6344 assert(g->root_package);