From 431438777fcffdc9c04af0d9dd4c9ec3a78cb730 Mon Sep 17 00:00:00 2001 From: Clarence <chengruichen3@gmail.com> Date: Fri, 30 Aug 2024 12:26:39 +0800 Subject: [PATCH] fix: match os_uname().sysname, not version --- lua/freeze-code/utils/init.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lua/freeze-code/utils/init.lua b/lua/freeze-code/utils/init.lua index 6192112..22034a0 100644 --- a/lua/freeze-code/utils/init.lua +++ b/lua/freeze-code/utils/init.lua @@ -101,9 +101,9 @@ end ---@class FreezeCodeUtils ---@field os FreezeCodeOS M.os = { - is_win = vim.loop.os_uname().version:match("Windows"), - is_macos = vim.loop.os_uname().version:match("Darwin"), - is_unix = vim.loop.os_uname().version:match("Linux"), + is_win = vim.loop.os_uname().sysname:match("Windows"), + is_macos = vim.loop.os_uname().sysname:match("Darwin"), + is_unix = vim.loop.os_uname().sysname:match("Linux"), } return M