Skip to content

Commit 2aa2e45

Browse files
committed
Try install beforehand
1 parent c49cfde commit 2aa2e45

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

azure-pipelines.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -610,7 +610,7 @@ jobs:
610610
targetType: inline
611611
script: |
612612
$sourceDir = Join-Path $env:LocalAppData Packages\WinGetDevCLI_8wekyb3d8bbwe\LocalState\DiagOutputDir
613-
$destinationDir = $(Build.ArtifactStagingDirectory)\WinGetLogs
613+
$destinationDir = Join-Path $(Build.ArtifactStagingDirectory) WinGetLogs
614614
Copy-Item -Path $sourceDir -Destination $destinationDir -Recurse -Force
615615
condition: succeededOrFailed()
616616

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,12 @@ BeforeAll {
2525
# The msstore source will be used to install DSCv3 package
2626
Import-Module Microsoft.WinGet.Client
2727

28+
$installResult = Install-WingetPackage -Id 9PCX3HX4HZ0Z -Source msstore
29+
if ($installResult.Status -ne 'Ok')
30+
{
31+
Write-Error "Failed to install DSCv3 package. Status: $($installResult.Status). ExtendedErrorCode $($installResult.ExtendedErrorCode)" -ErrorAction Stop
32+
}
33+
2834
function CreatePolicyKeyIfNotExists()
2935
{
3036
$registryExists = test-path -Path $wingetGroupPolicyRegistryRoot

0 commit comments

Comments
 (0)