fix(util): executable checks for `Util.open` (#528)

This commit is contained in:
kyoh86 2023-02-11 17:04:59 +09:00 committed by GitHub
parent b5eb07e728
commit 4917222c7e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -23,9 +23,9 @@ function M.open(uri)
elseif vim.fn.has("macunix") == 1 then elseif vim.fn.has("macunix") == 1 then
cmd = { "open", uri } cmd = { "open", uri }
else else
if vim.fn.executable("xdg-open") then if vim.fn.executable("xdg-open") == 1 then
cmd = { "xdg-open", uri } cmd = { "xdg-open", uri }
elseif vim.fn.executable("wslview") then elseif vim.fn.executable("wslview") == 1 then
cmd = { "wslview", uri } cmd = { "wslview", uri }
else else
cmd = { "open", uri } cmd = { "open", uri }