Skip to content

Commit d4a1c29

Browse files
committed
C#: Quote arguments containing whitespaces on windows in the tracer.
1 parent 8475464 commit d4a1c29

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

csharp/tools/tracing-config.lua

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ function RegisterExtractorPack(id)
6464

6565
-- for `dotnet test`, we should not append `-p:UseSharedCompilation=false` to the command line
6666
-- if an `exe` or `dll` is passed as an argument as the call is forwarded to vstest.
67-
if testMatch and (arg:match('%.exe$') or arg:match('%.dll')) then
67+
if testMatch and (arg:match('%.exe$') or arg:match('%.dll')) then
6868
match = false
6969
break
7070
end
@@ -110,7 +110,7 @@ function RegisterExtractorPack(id)
110110
invocation = {
111111
path = AbsolutifyExtractorPath(id, compilerPath),
112112
arguments = {
113-
commandLineString = table.concat(argv, " ")
113+
commandLineString = ArgvToCommandLineString(argv)
114114
}
115115
}
116116
}
@@ -174,7 +174,7 @@ function RegisterExtractorPack(id)
174174
seenCompilerCall = true
175175
end
176176
if seenCompilerCall then
177-
table.insert(extractorArgs, '"' .. arg .. '"')
177+
table.insert(extractorArgs, arg)
178178
end
179179
end
180180

@@ -184,7 +184,7 @@ function RegisterExtractorPack(id)
184184
invocation = {
185185
path = AbsolutifyExtractorPath(id, extractor),
186186
arguments = {
187-
commandLineString = table.concat(extractorArgs, " ")
187+
commandLineString = ArgvToCommandLineString(extractorArgs)
188188
}
189189
}
190190
}

0 commit comments

Comments
 (0)