Skip to content

Commit 26cf698

Browse files
committed
Add scripts to solution, fix helper script for use from Windows PowerShell, fix attempt to set a null value through COM in Windows PowerShell
1 parent 86d91e3 commit 26cf698

File tree

3 files changed

+12
-2
lines changed

3 files changed

+12
-2
lines changed

src/AppInstallerCLI.sln

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -217,6 +217,12 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tests", "Tests", "{02EA681E
217217
EndProject
218218
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WinGetMCPServer", "WinGetMCPServer\WinGetMCPServer.csproj", "{33745E4A-39E2-676F-7E23-50FB43848D25}"
219219
EndProject
220+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Scripts", "Scripts", "{F49C4C89-447E-4D15-B38B-5A8DCFB134AF}"
221+
ProjectSection(SolutionItems) = preProject
222+
PowerShell\scripts\Execute-WinGetTests.ps1 = PowerShell\scripts\Execute-WinGetTests.ps1
223+
PowerShell\scripts\Initialize-LocalWinGetModules.ps1 = PowerShell\scripts\Initialize-LocalWinGetModules.ps1
224+
EndProjectSection
225+
EndProject
220226
Global
221227
GlobalSection(SolutionConfigurationPlatforms) = preSolution
222228
Debug|ARM64 = Debug|ARM64
@@ -1048,6 +1054,7 @@ Global
10481054
{A0B4F808-B190-41C4-97CB-C8EA1932F84F} = {8D53D749-D51C-46F8-A162-9371AAA6C2E7}
10491055
{A33223D2-550B-4D99-A53D-488B1F68683E} = {60618CAC-2995-4DF9-9914-45C6FC02C995}
10501056
{7139ED6E-8FBC-0B61-3E3A-AA2A23CC4D6A} = {02EA681E-C7D8-13C7-8484-4AC65E1B71E8}
1057+
{F49C4C89-447E-4D15-B38B-5A8DCFB134AF} = {7C218A3E-9BC8-48FF-B91B-BCACD828C0C9}
10511058
EndGlobalSection
10521059
GlobalSection(ExtensibilityGlobals) = postSolution
10531060
SolutionGuid = {B6FDB70C-A751-422C-ACD1-E35419495857}

src/PowerShell/Microsoft.WinGet.Client.Engine/Commands/DownloadCommand.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,10 @@ public void Download(
136136
options.Platform = PSEnumHelpers.ToWindowsPlatform(psWindowsPlatform);
137137
}
138138

139-
options.TargetOSVersion = targetOSVersion;
139+
if (!string.IsNullOrEmpty(targetOSVersion))
140+
{
141+
options.TargetOSVersion = targetOSVersion;
142+
}
140143

141144
return await this.DownloadPackageAsync(package, options);
142145
}));

src/PowerShell/scripts/Initialize-LocalWinGetModules.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -245,6 +245,6 @@ if (-not $SkipImportModule)
245245
foreach($module in $modules)
246246
{
247247
Write-Host "Importing module $($module.Name)" -ForegroundColor Green
248-
Import-Module "$moduleRootOutput\$($module.Name)\" -Force
248+
Import-Module "$moduleRootOutput\$($module.Name)\$($module.Name).psd1" -Force
249249
}
250250
}

0 commit comments

Comments
 (0)