-
Notifications
You must be signed in to change notification settings - Fork 511
PowerShell update checker ignores POWERSHELL_UPDATECHECK
environment variable
#3226
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
Comments
Do you get the update notification when you start |
No, it only seems to occur when the Powershell Integrated Console in VS Code starts up (which is every time I start VS Code). I was getting this notification in pwsh.exe before I set the environment variable a few weeks ago. |
How/where are you setting the environment variable? |
Thanks @trolleyboy VSCode does not check for this variable when it runs its update mechanism, but this is a reasonable feature request to add a check for...thanks for catching and reporting this! |
I am experiencing the same issue. VSCode tells me that the current latest release is v7.2.0. It does not mention that it is the preview version, rc1. It really should so that the user can make an informed decision.
|
@Liturgist 7.2 is an LTS version, unless I'm missing something, this is as-expected. If it prompts you for 7.3.x when that chain starts, then there is a problem. Also it's not the preview version as you stated, 7.2 LTS was released today as RTM. |
I think this still might be misbehaving. Ideally if you're on an LTS it wouldn't prompt you to update to the "next LTS," just updates to your current LTS until it's out of support. Confirming now if the 7.2 update means 7.0 LTS Is no longer supported. |
Yeah, 7.0 LTS isn't end-of-life until December 3, 2022, so while 7.2 is an LTS, in this case I do not think the update check should be prompting the user. |
Closer examination of this issue is that it is still a feature request for the editor to respect this variable. But I agree with @Liturgist that this is a bug in PowerShell's update checker. |
I almost filed a bug...but actually @Liturgist you're running a non-LTS, 7.1.5. So nevermind all I said! It is strange that the update is pointing you at an RC, I'm guessing this was a cache issue and it prompted you to update before the 7.2 release (non-RC) refreshed on GitHub. |
@andschwa, what steps can I take to remove this "cache issue?" |
@andschwa so I agree the end-behavior (confirmed by tests) should be as such:
|
It should be gone now! |
Are you saying this is indeed working as intended @JustinGrote? |
No I'm saying we should have tests to confirm that if we fix it :) |
POWERSHELL_UPDATECHECK
environment variable
It took a while, but I got around to fixing this 😄 |
System Details
System Details Output
Issue Description
I am experiencing a problem with...
VS Code notifies as follows...
However I have set $Env:POWERSHELL_UPDATECHECK to "LTS" per https://docs.microsoft.com/en-us/powershell/scripting/whats-new/what-s-new-in-powershell-70?view=powershell-7.1#new-version-notification
Expected Behaviour
I'd expect the notification to only appear when updates to the LTS version of Powershell 7 are available. EG: 7.0.6.
Actual Behaviour
VS Code notifies as follows...
Attached Logs
Follow the instructions in the [troubleshooting docs](https://github.com/PowerShell/vscode-powershell/blob/master/docs/troubleshooting.md#logs
vscode-powershell.zip
vscode-powershell.zip
)
about capturing and sending logs.
The text was updated successfully, but these errors were encountered: