summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--xmake/core/base/winos.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/xmake/core/base/winos.lua b/xmake/core/base/winos.lua
index f2bc7b7d4..b425447cd 100644
--- a/xmake/core/base/winos.lua
+++ b/xmake/core/base/winos.lua
@@ -192,7 +192,7 @@ function winos.cmdargv(argv, opt)
-- if host is not Windows, paths may start with '/', which conflicts with '/<argname>'
-- note that checking if the next argument ends with '.json' will only work for /sourceDependencies
-- other arguments will remain broken, perhaps we should discuss a better solution
- if idx + 1 <= #argv and arg:find("^[-/]") and (os.is_host("windows") and (not arg1:find("^[-/]")) or (arg1:find("%.json$"))) then
+ if idx + 1 <= #argv and arg:find("^[-/]") and (os.is_host("windows") and (not arg1:find("^[-/]")) or (arg1:endswith(".json"))) then
f:write(os.args(arg, {escape = opt.escape}) .. " ")
f:write(os.args(arg1, {escape = opt.escape}) .. "\n")
idx = idx + 2