Skip to content

Commit ddcf3ed

Browse files
committed
[file.lua] fixed line trimming in macos search for bin
1 parent da05748 commit ddcf3ed

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/dtutils/file.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -207,9 +207,9 @@ local function _search_for_bin_macos(bin)
207207
local lines = du.split(output, "\n")
208208

209209
for _,line in ipairs(lines) do
210-
local spath = dtutils_file.sanitize_filename(line:sub(1, -2))
210+
local spath = dtutils_file.sanitize_filename(line:sub(1, -1))
211211
if dtutils_file.test_file(spath, "x") then
212-
dtutils_file.set_executable_path_preference(bin, spath)
212+
dtutils_file.set_executable_path_preference(bin, spath) -- save it so we don't have to search again
213213
result = spath
214214
end
215215
end

0 commit comments

Comments
 (0)