Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Suggestion to improve $*Preference defaults #12

Open
felixfbecker opened this issue Feb 3, 2022 · 0 comments
Open

Suggestion to improve $*Preference defaults #12

felixfbecker opened this issue Feb 3, 2022 · 0 comments

Comments

@felixfbecker
Copy link

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)

Happy to do a PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant