| ... | ... | @@ -805,11 +805,7 @@ pub const Builder = struct { |
| 805 | 805 | return name; |
| 806 | 806 | } |
| 807 | 807 | const full_path = try fs.path.join(self.allocator, [_][]const u8{ search_prefix, "bin", self.fmt("{}{}", name, exe_extension) }); |
| 808 | | if (fs.realpathAlloc(self.allocator, full_path)) |real_path| { |
| 809 | | return real_path; |
| 810 | | } else |_| { |
| 811 | | continue; |
| 812 | | } |
| 808 | return fs.realpathAlloc(self.allocator, full_path) catch continue; |
| 813 | 809 | } |
| 814 | 810 | } |
| 815 | 811 | if (self.env_map.get("PATH")) |PATH| { |
| ... | ... | @@ -820,11 +816,7 @@ pub const Builder = struct { |
| 820 | 816 | var it = mem.tokenize(PATH, [_]u8{fs.path.delimiter}); |
| 821 | 817 | while (it.next()) |path| { |
| 822 | 818 | const full_path = try fs.path.join(self.allocator, [_][]const u8{ path, self.fmt("{}{}", name, exe_extension) }); |
| 823 | | if (fs.realpathAlloc(self.allocator, full_path)) |real_path| { |
| 824 | | return real_path; |
| 825 | | } else |_| { |
| 826 | | continue; |
| 827 | | } |
| 819 | return fs.realpathAlloc(self.allocator, full_path) catch continue; |
| 828 | 820 | } |
| 829 | 821 | } |
| 830 | 822 | } |
| ... | ... | @@ -834,11 +826,7 @@ pub const Builder = struct { |
| 834 | 826 | } |
| 835 | 827 | for (paths) |path| { |
| 836 | 828 | const full_path = try fs.path.join(self.allocator, [_][]const u8{ path, self.fmt("{}{}", name, exe_extension) }); |
| 837 | | if (fs.realpathAlloc(self.allocator, full_path)) |real_path| { |
| 838 | | return real_path; |
| 839 | | } else |_| { |
| 840 | | continue; |
| 841 | | } |
| 829 | return fs.realpathAlloc(self.allocator, full_path) catch continue; |
| 842 | 830 | } |
| 843 | 831 | } |
| 844 | 832 | return error.FileNotFound; |