One thing I found myself always prepending to all my GitHub action PowerShell script is setting $ProgressPreference and $InformationPreference.
$ProgressPreference to 'Silent', because on the GitHub action log PowerShell cannot draw an interactive progress bar and it otherwise causes mangled output
$InformationPreference to 'SilentlyContinue' (instead of default 'Silent') because in GitHub actions you usually want to be able to log text with Write-Information (and the pipeline output is used as the action output). And can be a bit of a debugging pitfall to realize that Write-Information is swallowed).
What do you think about adding these two lines to the action itself so they don't have to be added manually? I think it would improve the developer experience and not be harmful (and worse case it can be overridden by the user)
One thing I found myself always prepending to all my GitHub action PowerShell script is setting
$ProgressPreference
and$InformationPreference
.$ProgressPreference
to'Silent'
, because on the GitHub action log PowerShell cannot draw an interactive progress bar and it otherwise causes mangled output$InformationPreference
to'SilentlyContinue'
(instead of default'Silent'
) because in GitHub actions you usually want to be able to log text withWrite-Information
(and the pipeline output is used as the action output). And can be a bit of a debugging pitfall to realize thatWrite-Information
is swallowed).What do you think about adding these two lines to the action itself so they don't have to be added manually? I think it would improve the developer experience and not be harmful (and worse case it can be overridden by the user)
Happy to do a PR.