Fix --make-repro-path option (#90989)
authorgithub-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Wed, 23 Aug 2023 23:03:15 +0000 (16:03 -0700)
committerGitHub <noreply@github.com>
Wed, 23 Aug 2023 23:03:15 +0000 (16:03 -0700)
Co-authored-by: Ivan Povazan <ivan.povazan@gmail.com>
Co-authored-by: Jan Kotas <jkotas@microsoft.com>
src/coreclr/tools/Common/CommandLineHelpers.cs

index 205592c..3fb977a 100644 (file)
@@ -210,7 +210,7 @@ namespace System.CommandLine
                 foreach (CliOption option in res.CommandResult.Command.Options)
                 {
                     OptionResult optionResult = res.GetResult(option);
-                    if (optionResult is null || option.Name == "make-repro-path")
+                    if (optionResult is null || option.Name == "--make-repro-path")
                     {
                         continue;
                     }
@@ -233,7 +233,7 @@ namespace System.CommandLine
                                 }
                                 foreach (string inputFile in dictionary.Values)
                                 {
-                                    rspFile.Add($"--{option.Name}:{ConvertFromOriginalPathToReproPackagePath(input: true, inputFile)}");
+                                    rspFile.Add($"{option.Name}:{ConvertFromOriginalPathToReproPackagePath(input: true, inputFile)}");
                                 }
                             }
                             else
@@ -241,7 +241,7 @@ namespace System.CommandLine
                                 foreach (string optInList in values)
                                 {
                                     if (!string.IsNullOrEmpty(optInList))
-                                        rspFile.Add($"--{option.Name}:{optInList}");
+                                        rspFile.Add($"{option.Name}:{optInList}");
                                 }
                             }
                         }
@@ -254,11 +254,11 @@ namespace System.CommandLine
                                     // if output option is used, overwrite the path to the repro package
                                     stringVal = ConvertFromOriginalPathToReproPackagePath(input: false, stringVal);
                                 }
-                                rspFile.Add($"--{option.Name}:{stringVal}");
+                                rspFile.Add($"{option.Name}:{stringVal}");
                             }
                             else
                             {
-                                rspFile.Add($"--{option.Name}:{val}");
+                                rspFile.Add($"{option.Name}:{val}");
                             }
                         }
                     }