From 58cdf151a58e26136f83c24e446c184902cf1689 Mon Sep 17 00:00:00 2001 From: Pietro Gagliardi Date: Sun, 7 Apr 2019 01:20:09 -0400 Subject: [PATCH] Ah, Write-Host was the key --- azure-pipelines/windows-setup-mingw.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/azure-pipelines/windows-setup-mingw.yml b/azure-pipelines/windows-setup-mingw.yml index 979f9177..743b1ff7 100644 --- a/azure-pipelines/windows-setup-mingw.yml +++ b/azure-pipelines/windows-setup-mingw.yml @@ -6,13 +6,13 @@ parameters: steps: - powershell: | Set-PSDebug -Trace 2 - echo "$env:ChocolateyInstall" 1>&2 - dir "$env:ChocolateyInstall" 1>&2 - dir "$env:ChocolateyInstall\lib" 1>&2 + Write-Host "$env:ChocolateyInstall" + dir "$env:ChocolateyInstall" | Write-Host + dir "$env:ChocolateyInstall\lib" | Write-Host $chocopath = where.exe choco.exe | Get-Item # apparently they didn't think to add this functionality from the start (multiple joins was only added in PowerShell 6 and Azure Pipelines is using 5.x), and the direct-CLR approach actually behaves differently (and I would need to check which version of .net Azure Pipelines is using anyway, since our use case isn't one of those cases where it behaves differently) $chocopath = Join-Path -Path $chocopath.Directory -ChildPath "install" | Join-Path -ChildPath "${{ parameters.which }}" | Join-Path -ChildPath "bin" - dir $chocopath 1>&2 + dir $chocopath | Write-Host Write-Error "##vso[task.prependpath]$chocopath" exit 1 displayName: 'Set Up MinGW-w64'