From 868fdb39e95c0ea0ec2aeacb5da622a99a8dddac Mon Sep 17 00:00:00 2001 From: ec965 <22567131+ec965@users.noreply.github.com> Date: Thu, 6 Oct 2022 22:27:53 -0700 Subject: [PATCH] Return true for wsl --- lua/openingh/utils.lua | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/lua/openingh/utils.lua b/lua/openingh/utils.lua index 7d68235..6b3317f 100644 --- a/lua/openingh/utils.lua +++ b/lua/openingh/utils.lua @@ -81,15 +81,16 @@ end -- opens a url in the correct OS function M.open_url(url) if vim.fn.has("mac") then - io.popen("open " .. url) + vim.fn.system("open " .. url) return true elseif vim.fn.has("win64") or vim.fn.has("win32") then - io.popen("start " .. url) + vim.fn.system("start " .. url) return true elseif vim.fn.has("wsl") then - io.popen("explorer.exe " .. url) + vim.fn.system("explorer.exe " .. url) + return true elseif vim.fn.has("linux") then - io.popen("xdg-open " .. url) + vim.fn.system("xdg-open " .. url) return true end