Skip to content

Commit 0781dc5

Browse files
committed
pr feedback and try fix tests
1 parent 1d9adde commit 0781dc5

2 files changed

Lines changed: 10 additions & 1 deletion

File tree

src/PowerShell/Microsoft.WinGet.Configuration.Engine/Commands/ConfigurationCommand.cs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -433,7 +433,13 @@ private async Task InstallDSCv3Package(OpenConfigurationParameters openParams)
433433
{{
434434
Install-Module -Name {WinGetClientModule} -Confirm:$False -Force
435435
}}
436-
Install-WingetPackage -Id {DSCv3PackageId} -Source msstore");
436+
437+
$InstallResult = Install-WingetPackage -Id {DSCv3PackageId} -Source msstore
438+
if ($InstallResult.Status -ne 'Ok')
439+
{{
440+
Write-Error 'Failed to install DSCv3 package.' -ErrorAction Stop
441+
}}
442+
");
437443

438444
await installDSCv3.InvokeAsync();
439445

src/PowerShell/tests/Microsoft.WinGet.Configuration.Tests.ps1

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@ BeforeAll {
2222

2323
Import-Module Microsoft.WinGet.Configuration
2424

25+
# The msstore source will be used to install DSCv3 package
26+
wingetdev source reset --force
27+
2528
function CreatePolicyKeyIfNotExists()
2629
{
2730
$registryExists = test-path -Path $wingetGroupPolicyRegistryRoot

0 commit comments

Comments
 (0)