Skip to content

Commit 58b99c2

Browse files
vonPBMunifTanjim
authored andcommitted
fix(utils): handle missing SHELL env variable
PR: simrat39#341
1 parent f3bc644 commit 58b99c2

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

Diff for: lua/rust-tools/utils/utils.lua

+1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ end
77

88
function M.is_nushell()
99
local shell = vim.loop.os_getenv("SHELL")
10+
if shell == nil then return false end
1011
local nu = "nu"
1112
-- Check if $SHELL ends in "nu"
1213
return shell:sub(-string.len(nu)) == nu

0 commit comments

Comments
 (0)