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
When using the PowerShell@2 task and enabling showWarnings, it becomes impossible to specifically ignore a single warning, even if WarningAction is set to Ignore or SilentlyContinue. Other "hacks", such as using redirect operator 3> to redirect warning output stream to file or $null, have not been successful to workaround this issue. This potentially causes massive log clutter when you still want to surface warning output to the pipeline summary view, but would like to disregard some of the non-important ones.
Running below example YAML pipeline, all of the warnings are still surfaced:
I thought surely the 3> redirect would work, but alas it doesn't. Thus far I have been unable to find any sort of workaround. Warnings are helpful, but only when they're relevant. Sometimes we call system level or pre-built cmdlets and cannot expect them to only print out relevant warnings (from our perspective at least).
Environment type (Please select at least one enviroment where you face this issue)
New issue checklist
Task name
Powershell
Task version
2
Issue Description
When using the
PowerShell@2
task and enablingshowWarnings
, it becomes impossible to specifically ignore a single warning, even ifWarningAction
is set toIgnore
orSilentlyContinue
. Other "hacks", such as using redirect operator3>
to redirect warning output stream to file or$null
, have not been successful to workaround this issue. This potentially causes massive log clutter when you still want to surface warning output to the pipeline summary view, but would like to disregard some of the non-important ones.Running below example YAML pipeline, all of the warnings are still surfaced:
I thought surely the
3>
redirect would work, but alas it doesn't. Thus far I have been unable to find any sort of workaround. Warnings are helpful, but only when they're relevant. Sometimes we call system level or pre-built cmdlets and cannot expect them to only print out relevant warnings (from our perspective at least).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
Windows
Relevant log output
Full task logs with system.debug enabled
No response
Repro steps
The text was updated successfully, but these errors were encountered: