Skip to content

Commit a53ef18

Browse files
Afroz Mohammedafroz429
authored andcommitted
limited MaximumVersion to 4.99.999 for release notes generator
1 parent 3a374c7 commit a53ef18

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

generator/ReleaseNotesGenerator/Program.cs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -442,16 +442,19 @@ private string DownloadModule(string moduleName, string moduleVersion, string as
442442

443443
using (Process process = new Process())
444444
{
445-
string moduleVersionParameter = "";
445+
string moduleVersionParameter = $" -MaximumVersion '4.99.999'";
446446
if (moduleVersion != null)
447447
{
448448
moduleVersionParameter = $" -RequiredVersion '{moduleVersion}'";
449449
}
450450

451+
string downloadModuleArguments =
452+
$"-NonInteractive -NoProfile -Command $ErrorActionPreference='Stop'; Save-Module -Name '{moduleName}'{moduleVersionParameter} -Path '{downloadFolder}'";
453+
Console.WriteLine($"Download Module arguments: {downloadModuleArguments}");
451454
process.StartInfo = new ProcessStartInfo
452455
{
453456
FileName = "pwsh",
454-
Arguments = $"-NonInteractive -NoProfile -Command $ErrorActionPreference='Stop'; Save-Module -Name '{moduleName}'{moduleVersionParameter} -Path '{downloadFolder}'",
457+
Arguments = downloadModuleArguments,
455458
UseShellExecute = false,
456459
RedirectStandardError = true
457460
};

0 commit comments

Comments
 (0)