From 917757fedfb95ed482cab4313907ce6ec698b603 Mon Sep 17 00:00:00 2001 From: Philipp Bokatius Date: Sun, 26 Feb 2023 18:46:15 +0100 Subject: [PATCH] fix: error on shell == nil --- lua/rust-tools/utils/utils.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/lua/rust-tools/utils/utils.lua b/lua/rust-tools/utils/utils.lua index 091f386..baaf975 100644 --- a/lua/rust-tools/utils/utils.lua +++ b/lua/rust-tools/utils/utils.lua @@ -7,6 +7,7 @@ end function M.is_nushell() local shell = vim.loop.os_getenv("SHELL") + if shell == nil then return false end local nu = "nu" -- Check if $SHELL ends in "nu" return shell:sub(-string.len(nu)) == nu