Skip to content

Commit 4f36394

Browse files
committed
fix(windows): Fixed cmake run command using forward instead of backslashes
Changed fix to only windows
1 parent 4e134ed commit 4f36394

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

lua/cmake-tools/terminal.lua

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -573,6 +573,9 @@ 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
576579
cwd = utils.transform_path(cwd)
577580
local envTbl = {}
578581
local fmtStr = osys.iswin32 and "set %s=%s" or "%s=%s"

0 commit comments

Comments
 (0)