Skip to content

Support notification on pwsh startup when a new update is available #162

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

Merged
merged 11 commits into from
Feb 19, 2020
14 changes: 14 additions & 0 deletions 1-Draft/RFCNNNN-Notification-On-Version-Update.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ This section talks about
- how to synchronize update checks from different processes of the same version `pwsh` so that at most only one can run to complete during a day
- how to do the update check
- how to display the notification
- how to control the update notification behavior using an environment variable

#### When to do the update check

Expand Down Expand Up @@ -241,6 +242,19 @@ This is comparatively the easy part.
- If a file path is returned, then get the version information from the file name.
- Use that version to construct the notification message, including the URL to that GitHub release page.

#### How to control the update notification behavior using an environment variable

The environment variable `POWERSHELL_UPDATECHECK` will be introduced to control the behavior of the update notification feature.
The environment variable supports 3 values:

- `Default`. This gives you the default behaviors:
- `pwsh` of preview versions check for the new preview version as well as the new GA version.
- `pwsh` of GA versions check for the new GA version only.

- `Off`. This turns off the update notification feature.

- `LTS`. `pwsh` of both preview and stable versions check for the new LTS GA version only.

## Alternate Proposals and Considerations

When thinking about how to reduce unnecessary update checks,
Expand Down