Skip to content

Commit e4b8a6d

Browse files
committed
temp pipeline change to see why install failed
1 parent 0781dc5 commit e4b8a6d

File tree

3 files changed

+16
-8
lines changed

3 files changed

+16
-8
lines changed

azure-pipelines.yml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -520,7 +520,7 @@ jobs:
520520
# Build and test PowerShell module
521521

522522
- job: 'BuildPowerShellModule'
523-
timeoutInMinutes: 120
523+
timeoutInMinutes: 240
524524
dependsOn: 'Build'
525525
condition: succeeded('Build')
526526
variables:
@@ -603,6 +603,16 @@ jobs:
603603
failTaskOnFailedTests: true
604604
condition: succeededOrFailed()
605605

606+
- task: PowerShell@2
607+
displayName: Copy winget logs
608+
inputs:
609+
pwsh: true
610+
targetType: inline
611+
script: |
612+
$sourceDir = Join-Path $env:LocalAppData Packages\WinGetDevCLI_8wekyb3d8bbwe\LocalState\DiagOutputDir
613+
$destinationDir = $(Build.ArtifactStagingDirectory)\WinGetLogs
614+
Copy-Item -Path $sourceDir -Destination $destinationDir -Recurse -Force
615+
606616
- task: PublishPipelineArtifact@1
607617
displayName: Publish PowerShell Module Artifacts
608618
inputs:

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -434,10 +434,10 @@ private async Task InstallDSCv3Package(OpenConfigurationParameters openParams)
434434
Install-Module -Name {WinGetClientModule} -Confirm:$False -Force
435435
}}
436436
437-
$InstallResult = Install-WingetPackage -Id {DSCv3PackageId} -Source msstore
438-
if ($InstallResult.Status -ne 'Ok')
437+
$installResult = Install-WingetPackage -Id {DSCv3PackageId} -Source msstore
438+
if ($installResult.Status -ne 'Ok')
439439
{{
440-
Write-Error 'Failed to install DSCv3 package.' -ErrorAction Stop
440+
Write-Error ""Failed to install DSCv3 package. Status: $($installResult.Status). ExtendedErrorCode $($installResult.ExtendedErrorCode)"" -ErrorAction Stop
441441
}}
442442
");
443443

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

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,6 @@ 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-
2825
function CreatePolicyKeyIfNotExists()
2926
{
3027
$registryExists = test-path -Path $wingetGroupPolicyRegistryRoot
@@ -216,7 +213,8 @@ BeforeAll {
216213

217214
function EnsureDSCv3TestResourcePresence()
218215
{
219-
$resourcePath = Join-Path $env:LOCALAPPDATA "Microsoft\WindowsApps\test-file.dsc.resource.json"
216+
$localAppDataPath = [Environment]::GetFolderPath([Environment+SpecialFolder]::LocalApplicationData)
217+
$resourcePath = Join-Path $localAppDataPath "Microsoft\WindowsApps\test-file.dsc.resource.json"
220218
if (-not (Test-Path $resourcePath))
221219
{
222220
wingetdev dscv3 test-file --manifest -o $resourcePath

0 commit comments

Comments
 (0)