Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lua/CopilotChat/config/functions.lua
Original file line number Diff line number Diff line change
Expand Up @@ -408,7 +408,7 @@ return {

resolve = function(input, source)
local cmd = { 'bash', '-c', input.command }
local out = utils.system(cmd, { cwd = source.cwd() })
local out = utils.system(cmd, source.cwd())

return {
{
Expand Down
6 changes: 3 additions & 3 deletions lua/CopilotChat/utils.lua
Original file line number Diff line number Diff line change
Expand Up @@ -125,9 +125,9 @@ end
--- Call a system command
---@param cmd table The command
---@async
M.system = async.wrap(function(cmd, callback)
vim.system(cmd, { text = true }, callback)
end, 2)
M.system = async.wrap(function(cmd, cwd, callback)
vim.system(cmd, { cwd = cwd, text = true }, callback)
end, 3)

--- Schedule a function only when needed (not on main thread)
---@param callback function The callback
Expand Down
Loading