Skip to content

Stop attempting to update PowerShell via unattended MSI installer #4553

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

Closed
5 of 6 tasks
schittli opened this issue May 2, 2023 · 1 comment · Fixed by #4570
Closed
5 of 6 tasks

Stop attempting to update PowerShell via unattended MSI installer #4553

schittli opened this issue May 2, 2023 · 1 comment · Fixed by #4570
Assignees
Labels
Area-UI Issue-Bug A bug to squash.

Comments

@schittli
Copy link

schittli commented May 2, 2023

Prerequisites

  • I have written a descriptive issue title.
  • I have searched all open and closed issues to ensure it has not already been reported.
  • I have read the troubleshooting guide.
  • I am sure this issue is with the extension itself and does not reproduce in a standalone PowerShell instance.
  • I have verified that I am using the latest version of Visual Studio Code and the PowerShell extension.
  • If this is a security issue, I have read the security issue reporting guidance.

Summary

Good evening

The vscode-powershell implementation of the "inplace PowerShell 7 update" is unfortunately terribly awkwardly implemented and it's random if the PowerShell 7 update works at all.
In the most embarrassing case, the PowerShell 7 update works like this:

  1. the VS Code Extension reports the PowerShell 7 update
  2. the PowerShell 7 update detects that VS Code has started pwsh.exe and aks if it should stop the exe
  3. if the user chooses that the setup should terminate pwsh.exe, it happens that VS Code is terminated as well.
  4. because VS Code is terminated, the PowerShell 7 setup is also killed

It would be much more useful if the VS Code vscode-powershell Extension would just offer two links if it detects the update:
Link 1: Link to the Setup exe. If the user clicks to the link, the web browser is opened, so that the setup will work for sure (it must be starte independent of VS Code)
Link 2: Link to the release notes.

Thanks a lot, kind regards,
Thomas

PowerShell Version

Name                           Value
----                           -----
PSVersion                      7.2.11
PSEdition                      Core
GitCommitId                    7.2.11
OS                             Microsoft Windows 10.0.19044
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0

Visual Studio Code Version

1.77.3
704ed70d4fd1c6bd6342c436f1ede30d1cff4710
x64

Extension Version

Steps to Reproduce

  1. Wait, until the vscode-powershell extension reports a PowerShell 7 update
  2. Start the Update from the vscode-powershell extension pupup dialog
  3. The PowerShell 7 update usually gets a nightmare which ends in the user is using google for PowerShell 7 update, downloads the setup exe himself and install it without VS Code and the vscode-powershell extension

Visuals

n/a

Logs

n/a

@schittli schittli added the Issue-Bug A bug to squash. label May 2, 2023
@ghost ghost added the Needs: Triage Maintainer attention needed! label May 2, 2023
@andyleejordan
Copy link
Member

if the user chooses that the setup should terminate pwsh.exe, it happens that VS Code is terminated as well.

This shouldn't be happening at all and is a bug.

Link 1: Link to the Setup exe. If the user clicks to the link, the web browser is opened, so that the setup will work for sure (it must be starte independent of VS Code)

This is actually what happens in every case except when an MSI is available (try it out on macOS, Linux, or an Arm64 Windows).

I'll take a look a the bug where Code is terminating, and TBH I wanted to remove the auto-install logic around the MSI at the time we updated the code anyway, since I didn't think it could be that reliable. Turns out it's not!

Thanks for the report.

@andyleejordan andyleejordan added Area-UI and removed Needs: Triage Maintainer attention needed! labels May 10, 2023
@andyleejordan andyleejordan self-assigned this May 10, 2023
@andyleejordan andyleejordan moved this to In Progress in Flying Fox May 10, 2023
@andyleejordan andyleejordan changed the title If vscode-powershell reports PowerShell 7 updates, then please select a professional / working solution Stop attempting to update PowerShell via unattended MSI installer May 10, 2023
@github-project-automation github-project-automation bot moved this from In Progress to Done in Flying Fox May 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-UI Issue-Bug A bug to squash.
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants