Skip to content

Commit

Permalink
C#: Use -p: instead of /p: with dotnet
Browse files Browse the repository at this point in the history
Makes a difference for `dotnet run` where the option will otherwise be considered
an argument to the program that is run.
  • Loading branch information
hvitved committed Sep 5, 2022
1 parent 623ba79 commit d8b352c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions csharp/tools/tracing-config.lua
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ function RegisterExtractorPack(id)
-- For now, parse the command line as follows:
-- Everything that starts with `-` (or `/`) will be ignored.
-- The first non-option argument is treated as the command.
-- if that's `build`, we append `/p:UseSharedCompilation=false` to the command line,
-- if that's `build`, we append `-p:UseSharedCompilation=false` to the command line,
-- otherwise we do nothing.
local match = false
local needsSeparator = false;
Expand All @@ -37,7 +37,7 @@ function RegisterExtractorPack(id)
break
end
if arg == 'run' then
-- for `dotnet run`, we need to make sure that `/p:UseSharedCompilation=false` is
-- for `dotnet run`, we need to make sure that `-p:UseSharedCompilation=false` is
-- not passed in as an argument to the program that is run
match = true
needsSeparator = true
Expand All @@ -49,7 +49,7 @@ function RegisterExtractorPack(id)
end
end
if match then
local injections = { '/p:UseSharedCompilation=false' }
local injections = { '-p:UseSharedCompilation=false' }
if needsSeparator then
table.insert(injections, '--')
end
Expand Down

0 comments on commit d8b352c

Please sign in to comment.