diff --git a/.github/workflows/luarocks.yml b/.github/workflows/luarocks.yml index bdfc498..61f86f2 100644 --- a/.github/workflows/luarocks.yml +++ b/.github/workflows/luarocks.yml @@ -14,7 +14,7 @@ jobs: steps: - uses: actions/checkout@v3 - name: Luarocks upload - uses: nvim-neorocks/luarocks-tag-release@v5 + uses: nvim-neorocks/luarocks-tag-release@v7 with: name: flatten.nvim labels: | diff --git a/lua/flatten/core.lua b/lua/flatten/core.lua index e7388d3..a6c2a42 100644 --- a/lua/flatten/core.lua +++ b/lua/flatten/core.lua @@ -3,7 +3,7 @@ local M = {} local function path_is_absolute(path) path = string.gsub(path, "^%s+://", "") - if jit.os == "Windows" then + if vim.fn.has("win32") == 1 then return string.find(path, "^%a:") ~= nil else return string.find(path, "^/") ~= nil diff --git a/lua/flatten/guest.lua b/lua/flatten/guest.lua index 068a11d..a1d83e8 100644 --- a/lua/flatten/guest.lua +++ b/lua/flatten/guest.lua @@ -38,7 +38,7 @@ local function send_files(files, stdin, quickfix) local server = vim.fn.fnameescape(vim.v.servername) local cwd = vim.fn.fnameescape(vim.fn.getcwd(-1, -1)) - if jit.os == "Windows" then + if vim.fn.has("win32") == 1 then server = sanitize(server) cwd = sanitize(cwd) end @@ -71,7 +71,7 @@ end local function send_commands() local server = vim.fn.fnameescape(vim.v.servername) local cwd = vim.fn.fnameescape(vim.fn.getcwd(-1, -1)) - if jit.os == "Windows" then + if vim.fn.has("win32") == 1 then server = sanitize(server) cwd = sanitize(cwd) end