From 96911001388bc6e168210f353db4d211bfaa2564 Mon Sep 17 00:00:00 2001 From: Michael Nebel Date: Fri, 8 Sep 2023 15:09:08 +0200 Subject: [PATCH] C#: Poor mans quoting of arguments on windows. --- csharp/tools/tracing-config.lua | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/csharp/tools/tracing-config.lua b/csharp/tools/tracing-config.lua index 716a6f42cee..1b63cb9caeb 100644 --- a/csharp/tools/tracing-config.lua +++ b/csharp/tools/tracing-config.lua @@ -84,6 +84,10 @@ function RegisterExtractorPack(id) dotnetRunNeedsSeparator = false dotnetRunInjectionIndex = i end + -- if we encounter a whitespace, we explicitly need to quote the argument. + if OperatingSystem == 'windows' and arg:match('%s') then + argv[i] = '"' .. arg .. '"' + end end if match then local injections = { '-p:UseSharedCompilation=false', '-p:EmitCompilerGeneratedFiles=true' }