You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In InitializeAzModuleFunctions.ps1 following code needs to be changed.
From: Write-Host "##[command]$command $args"
To: Write-Host "##[command]$command $($args | Out-String)"
$args is a hashtable and using it inside quotation marks on write-host will only output object type to terminal and not the contents of it. By piping to out-string will change this behavior.
Environment type (Please select at least one enviroment where you face this issue)
Self-Hosted
Microsoft Hosted
VMSS Pool
Container
Azure DevOps Server type
dev.azure.com (formerly visualstudio.com)
Azure DevOps Server Version (if applicable)
No response
Operation system
All
Relevant log output
From AzurePowershellV5 output using the helper function:
Connect-AzAccount System.Collections.Hashtable
The content you are editing has changed. Please copy your edits and refresh the page.
mortenlerudjordet
changed the title
[BUG]: InitializeAzModuleFunctions.ps1 outputs object type and not content when using write-host
[BUG]: VstsAzureHelpers_ --> InitializeAzModuleFunctions.ps1 outputs object type and not content when using write-host
Mar 27, 2024
New issue checklist
Task name
common/VstsAzureHelpers_
Task version
latest
Issue Description
In InitializeAzModuleFunctions.ps1 following code needs to be changed.
From:
Write-Host "##[command]$command $args"
To:
Write-Host "##[command]$command $($args | Out-String)"
$args is a hashtable and using it inside quotation marks on write-host will only output object type to terminal and not the contents of it. By piping to out-string will change this behavior.
Environment type (Please select at least one enviroment where you face this issue)
Azure DevOps Server type
dev.azure.com (formerly visualstudio.com)
Azure DevOps Server Version (if applicable)
No response
Operation system
All
Relevant log output
Tasks
The text was updated successfully, but these errors were encountered: