Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix repro package creation #78924

Merged
merged 3 commits into from
Dec 1, 2022
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions src/coreclr/tools/Common/CommandLineHelpers.cs
Original file line number Diff line number Diff line change
Expand Up @@ -182,8 +182,11 @@ public static void MakeReproPackage(string makeReproPath, string outputFilePath,
object val = res.CommandResult.GetValue(option);
if (val is not null && !(descriptor.HasDefaultValue && descriptor.GetDefaultValue().Equals(val)))
{
if (val is IEnumerable<string> values)
if (val is IEnumerable<string> || val is IDictionary<string, string>)
{
if (!(val is IEnumerable<string> values))
values = ((IDictionary<string, string>)val).Values;

if (inputOptionNames.Contains(option.Name))
{
Dictionary<string, string> dictionary = new();
Expand Down Expand Up @@ -214,8 +217,11 @@ public static void MakeReproPackage(string makeReproPath, string outputFilePath,
foreach (var argument in res.CommandResult.Command.Arguments)
{
object val = res.CommandResult.GetValue(argument);
if (val is IEnumerable<string> values)
if (val is IEnumerable<string> || val is IDictionary<string, string>)
{
if (!(val is IEnumerable<string> values))
values = ((IDictionary<string, string>)val).Values;

foreach (string optInList in values)
{
rspFile.Add($"{ConvertFromInputPathToReproPackagePath((string)optInList)}");
Expand Down