Skip to content

Commit 6fe9b70

Browse files
committed
C#: Poor mans quoting of arguments on windows.
1 parent a2659ee commit 6fe9b70

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

csharp/tools/tracing-config.lua

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,10 @@ function RegisterExtractorPack(id)
8484
dotnetRunNeedsSeparator = false
8585
dotnetRunInjectionIndex = i
8686
end
87+
-- if we encounter a whitespace, we explicitly need to quote the argument.
88+
if OperatingSystem == 'windows' and arg:match('%s') then
89+
argv[i] = '"' .. arg .. '"'
90+
end
8791
end
8892
if match then
8993
local injections = { '-p:UseSharedCompilation=false', '-p:EmitCompilerGeneratedFiles=true' }

0 commit comments

Comments
 (0)