From 29c336ae882f0bb075548a779e1f0fa1430b406c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Amaury=20Lev=C3=A9?= Date: Wed, 9 Nov 2022 18:44:26 +0100 Subject: [PATCH] Update src/Cli/dotnet/commands/dotnet-test/Program.cs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Jakub Jareš --- src/Cli/dotnet/commands/dotnet-test/Program.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Cli/dotnet/commands/dotnet-test/Program.cs b/src/Cli/dotnet/commands/dotnet-test/Program.cs index 4cce5cee57cf..993b52d2f54d 100644 --- a/src/Cli/dotnet/commands/dotnet-test/Program.cs +++ b/src/Cli/dotnet/commands/dotnet-test/Program.cs @@ -121,7 +121,8 @@ private static TestCommand FromParseResult(ParseResult result, string[] settings // Extra msbuild properties won't be parsed and so end up in the UnmatchedTokens list. In addition to those // properties, all the test settings properties are also considered as unmatched but we don't want to forward - // these as-is to msbuild. So we filter out the test settings properties from the unmatched tokens. + // these as-is to msbuild. So we filter out the test settings properties from the unmatched tokens, + // by only taking values until the first item after `--`. (`--` is not present in the UnmatchedTokens ). var unMatchedNonSettingsArgs = settings.Length > 1 ? result.UnmatchedTokens.TakeWhile(x => x != settings[1]) : result.UnmatchedTokens;