Skip to content

Commit b7fc83e

Browse files
committed
Patch cmd before it reaches the runners
1 parent 4f36394 commit b7fc83e

2 files changed

Lines changed: 4 additions & 3 deletions

File tree

lua/cmake-tools/terminal.lua

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -573,9 +573,6 @@ function _terminal.run(cmd, env_script, env, args, cwd, opts, on_exit, on_output
573573
-- Escape all special pattern characters
574574
local escapedCwd = cwd:gsub("([%^%$%(%)%%%.%[%]%*%+%-%?])", "%%%1")
575575
cmd = cmd:gsub(escapedCwd, osys.iswin32 and ".\\" or "./")
576-
if osys.iswin32 then
577-
cmd = cmd:gsub("/", "\\")
578-
end
579576
cwd = utils.transform_path(cwd)
580577
local envTbl = {}
581578
local fmtStr = osys.iswin32 and "set %s=%s" or "%s=%s"

lua/cmake-tools/utils.lua

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,10 @@ function utils.run(cmd, env_script, env, args, cwd, runner, callback)
188188
-- save all
189189
vim.cmd("silent exec " .. '"wall"')
190190

191+
if osys.iswin32 then
192+
cmd = cmd:gsub('/', '\\')
193+
end
194+
191195
local ntfy = notification:new("runner")
192196

193197
ntfy:notify(cmd, "info")

0 commit comments

Comments
 (0)