mirror of
https://github.com/github/codeql.git
synced 2025-12-17 01:03:14 +01:00
C#: Use -p: instead of /p: with dotnet
Makes a difference for `dotnet run` where the option will otherwise be considered an argument to the program that is run.
This commit is contained in:
@@ -16,7 +16,7 @@ function RegisterExtractorPack(id)
|
|||||||
-- For now, parse the command line as follows:
|
-- For now, parse the command line as follows:
|
||||||
-- Everything that starts with `-` (or `/`) will be ignored.
|
-- Everything that starts with `-` (or `/`) will be ignored.
|
||||||
-- The first non-option argument is treated as the command.
|
-- 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.
|
-- otherwise we do nothing.
|
||||||
local match = false
|
local match = false
|
||||||
local needsSeparator = false;
|
local needsSeparator = false;
|
||||||
@@ -37,7 +37,7 @@ function RegisterExtractorPack(id)
|
|||||||
break
|
break
|
||||||
end
|
end
|
||||||
if arg == 'run' then
|
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
|
-- not passed in as an argument to the program that is run
|
||||||
match = true
|
match = true
|
||||||
needsSeparator = true
|
needsSeparator = true
|
||||||
@@ -49,7 +49,7 @@ function RegisterExtractorPack(id)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
if match then
|
if match then
|
||||||
local injections = { '/p:UseSharedCompilation=false' }
|
local injections = { '-p:UseSharedCompilation=false' }
|
||||||
if needsSeparator then
|
if needsSeparator then
|
||||||
table.insert(injections, '--')
|
table.insert(injections, '--')
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user