From 2ffe820ec11baadca7073199fbc2812b7ac0e9d8 Mon Sep 17 00:00:00 2001 From: Waitzz <59369014+Waitzz@users.noreply.github.com> Date: Mon, 29 Dec 2025 17:30:11 +0800 Subject: [PATCH] fix: avante.llm_tools.helpers.is_ignored error (#2895) --- lua/avante/llm_tools/helpers.lua | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lua/avante/llm_tools/helpers.lua b/lua/avante/llm_tools/helpers.lua index 2a3b4e1..501ba43 100644 --- a/lua/avante/llm_tools/helpers.lua +++ b/lua/avante/llm_tools/helpers.lua @@ -129,9 +129,7 @@ end ---@return boolean function M.is_ignored(abs_path) local project_root = Utils.get_project_root() - local exit_code = vim - .system({ "git", "-C", vim.fn.shellescape(project_root), "check-ignore", vim.fn.shellescape(abs_path) }, { text = true }) - :wait().code + local exit_code = vim.system({ "git", "-C", project_root, "check-ignore", abs_path }, { text = true }):wait().code -- If command failed or git is not available or not a git repository, fall back to old method if exit_code ~= 0 and exit_code ~= 1 then return old_is_ignored(abs_path) end