Skip to content

Commit

Permalink
fix: env function wont run in callback
Browse files Browse the repository at this point in the history
  • Loading branch information
2KAbhishek committed Nov 21, 2024
1 parent f03fb3d commit 5f9f95f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lua/utils.lua
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ local M = {}
---@type table<number, {message: string, level: number, title: string, timeout: number}>
local notification_queue = {}

---@type boolean
local inside_tmux = vim.env.TMUX ~= nil

---@return path
local function get_cache_dir()
local cache_dir = vim.fn.stdpath('cache')
Expand Down Expand Up @@ -109,7 +112,6 @@ end

---@param dir string
M.open_dir = function(dir)
local inside_tmux = vim.env.TMUX ~= nil
if inside_tmux then
local open_cmd = string.format('tea %s', dir)
local open_result = os.execute(open_cmd)
Expand Down

0 comments on commit 5f9f95f

Please sign in to comment.