authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2018-06-18 12:18:39-04:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2018-06-18 12:18:39-04:00
log4ce36a64755b4b2ca8bb28e3ac91b23dfe90ade8
treeec1061cfe181ad97d84ddbc139354e8d086fcda9
parentc09c3902c441bbf5dd1421f6ccd9f0dac5c6d96e

adjust logic for finding the path to zig executable on darwin


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

src/os.cpp+4-4
......@@ -1004,10 +1004,10 @@ int os_self_exe_path(Buf *out_path) {
10041004 // Resolve the real path from that.
10051005 buf_resize(out_path, PATH_MAX);
10061006 char *real_path = realpath(buf_ptr(tmp), buf_ptr(out_path));
1007 assert(real_path == buf_ptr(out_path));
1008
1009 // Deallocate our scratch space.
1010 buf_deinit(tmp);
1007 if (!real_path) {
1008 buf_init_from_buf(out_path, tmp);
1009 return 0;
1010 }
10111011
10121012 // Resize out_path for the correct length.
10131013 buf_resize(out_path, strlen(buf_ptr(out_path)));