From a1a89f5040b84e69fb5fc584aea89566d263fc7c Mon Sep 17 00:00:00 2001 From: ray-x Date: Wed, 8 Nov 2023 17:17:07 +1100 Subject: [PATCH] checking windows os: add mingw --- lua/go/asyncmake.lua | 3 +-- lua/go/gotest.lua | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/lua/go/asyncmake.lua b/lua/go/asyncmake.lua index d4d85ca..8169f08 100644 --- a/lua/go/asyncmake.lua +++ b/lua/go/asyncmake.lua @@ -5,8 +5,7 @@ local log = util.log local trace = util.trace local getopt = require('go.alt_getopt') -local os_name = vim.loop.os_uname().sysname -local is_windows = os_name == 'Windows' or os_name == 'Windows_NT' or os_name:find('MINGW64_NT') +local is_windows = util.is_windows() local is_git_shell = is_windows and (vim.fn.exists('$SHELL') and vim.fn.expand('$SHELL'):find('bash.exe') ~= nil) diff --git a/lua/go/gotest.lua b/lua/go/gotest.lua index 7c86632..6da8e26 100644 --- a/lua/go/gotest.lua +++ b/lua/go/gotest.lua @@ -29,8 +29,7 @@ local sep = require('go.utils').sep() local short_opts = 'a:cC:b:fFmn:pst:rv' local bench_opts = { '-benchmem', '-cpuprofile', 'profile.out' } -local os_name = vim.loop.os_uname().sysname -local is_windows = os_name == 'Windows' or os_name == 'Windows_NT' +local is_windows = utils.is_windows() local is_git_shell = is_windows and (vim.fn.exists('$SHELL') and vim.fn.expand('$SHELL'):find('bash.exe') ~= nil) M.efm = function()