diff --git a/CHANGELOG.md b/CHANGELOG.md index de0ddd810..5356b748c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed - Fixed an issue where template insertion occurred below the intended line, it now correctly inserts at the current line. +- Fixed `:ObsidianOpen` issue on WSL OS name identifier check with different release name case. ## [v3.7.8](https://github.com/epwalsh/obsidian.nvim/releases/tag/v3.7.8) - 2024-04-09 diff --git a/lua/obsidian/util.lua b/lua/obsidian/util.lua index 9c482a8d1..5c31de273 100644 --- a/lua/obsidian/util.lua +++ b/lua/obsidian/util.lua @@ -437,9 +437,9 @@ util.get_os = function() if vim.fn.has "win32" == 1 then this_os = util.OSType.Windows else - local sysname = vim.loop.os_uname().sysname - local release = vim.loop.os_uname().release - if sysname == "Linux" and string.find(release, "microsoft") then + local sysname = vim.loop.os_uname().sysname:lower() + local release = vim.loop.os_uname().release:lower() + if sysname == "linux" and string.find(release, "microsoft") then this_os = util.OSType.Wsl else this_os = sysname