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