From 598d24bf888be149114b06d988fdafd5b52ef0a0 Mon Sep 17 00:00:00 2001 From: Clarence Date: Wed, 4 Sep 2024 04:47:29 +0800 Subject: [PATCH] fix: match os_uname().sysname, not version (#17) --- 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