Merge pull request #926 from Blizzard/translateCommandsAndPaths-fixes

Fixes translateCommandsAndPaths, and debugargs.
This commit is contained in:
Tom van Dijck 2017-11-30 09:25:58 -08:00 committed by GitHub
commit 5a0b07cd45
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 6 deletions

View File

@ -103,7 +103,8 @@
function m.localDebuggerCommandArguments(cfg)
if #cfg.debugargs > 0 then
p.x('<LocalDebuggerCommandArguments>%s</LocalDebuggerCommandArguments>', table.concat(cfg.debugargs, " "))
local args = os.translateCommandsAndPaths(cfg.debugargs, cfg.project.basedir, cfg.project.location)
p.x('<LocalDebuggerCommandArguments>%s</LocalDebuggerCommandArguments>', table.concat(args, " "))
end
end

View File

@ -155,8 +155,8 @@
filter "configurations:Debug"
targetdir "bin/debug"
debugargs { "--scripts=%{prj.location}/%{path.getrelative(prj.location, prj.basedir)} test"}
debugdir "%{path.getrelative(prj.location, prj.basedir)}"
debugargs { "--scripts=%{prj.location}/%{path.getrelative(prj.location, prj.basedir)}", "test" }
debugdir "."
filter "configurations:Release"
targetdir "bin/release"

View File

@ -661,11 +661,11 @@
---
-- Apply os slashes for decorated command paths.
---
function os.translateCommandAndPath(path, map)
function os.translateCommandAndPath(dir, map)
if map == 'windows' then
return path.translate(result)
return path.translate(dir)
end
return path
return dir
end
---