Skip to content

[Preview] powerShellDefaultVersion workspace setting doesn't work for autodiscovered paths #2380

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
JustinGrote opened this issue Dec 19, 2019 · 3 comments · Fixed by #2399
Closed
Assignees
Labels

Comments

@JustinGrote
Copy link
Collaborator

@TylerLeonhardt, likely related to @rjmholt's detection logic.

Issue Description

Workspace Settings does not work for powershellDefaultVersion for the autodiscovered powershell paths. It triggers but does not switch correctly. This is probably due to something in the new discovery code. User Settings works fine.

Capture

Interestingly, the "setting" in vscode still knows it as x86, even though it loads x64, so it's not a settings loading issue.

Probably related, it appears to only happen with "built-in" shells. Using AdditionalExePath entries works fine.

Capture

Attached Logs

Follow the instructions in the README about
capturing and sending logs.

Environment Information

Visual Studio Code

Name Version
Operating System Windows_NT x64 10.0.19041
VSCode 1.42.0-insider
PowerShell Extension Version 2019.12.0

PowerShell Information

Name Value
PSVersion 7.0.0-preview.6
PSEdition Core
GitCommitId 7.0.0-preview.6
OS Microsoft Windows 10.0.19041
Platform Win32NT
PSCompatibleVersions 1.0 2.0 3.0 4.0 5.0 5.1.10032.0 6.0.0 6.1.0 6.2.0 7.0.0-preview.6
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0

Visual Studio Code Extensions

Visual Studio Code Extensions(Click to Expand)
Extension Author Version
better-align wwm 1.1.6
better-comments aaron-bond 2.0.5
better-powershell-syntax-highlighting justin-grote 0.0.2
bracket-pair-colorizer-2 CoenraadS 0.0.29
code-settings-sync Shan 3.4.3
gc-excelviewer GrapeCity 2.1.32
gistfs vsls-contrib 0.0.22
git-graph mhutchie 1.19.1
gitlens eamodio 10.2.0
indent-rainbow oderwat 7.4.0
markdown-all-in-one yzhang 2.6.1
powershell-preview ms-vscode 2019.12.0
remote-containers ms-vscode-remote 0.96.0
remote-ssh-edit-nightly ms-vscode-remote 2019.12.24000
remote-ssh-nightly ms-vscode-remote 2019.12.24000
remote-wsl ms-vscode-remote 0.41.6
todo-tree Gruntfuggly 0.0.162
vscode-icons vscode-icons-team 9.6.0
vscode-peacock johnpapa 3.2.0
vscode-sort-json richie5um2 1.18.0
vscode-zipexplorer slevesque 0.3.1
@ghost ghost added the Needs: Triage Maintainer attention needed! label Dec 19, 2019
@TylerLeonhardt
Copy link
Member

TylerLeonhardt commented Dec 19, 2019

Yes I think @rjmholt made this discovery earlier this week. Thanks for capturing it in an issue. It seems to be an issue with how we find the 32bit version of PowerShell. It's easy to get wrong as the paths to Windows PowerShell are totally different if you open VS Code 64 bit vs VS Code 32bit.

@TylerLeonhardt TylerLeonhardt added Area-Startup Issue-Bug A bug to squash. and removed Needs: Triage Maintainer attention needed! labels Dec 19, 2019
@rjmholt
Copy link
Contributor

rjmholt commented Jan 2, 2020

I think this is actually a case-sensitivity issue; try changing Windows Powershell (x86) to Windows PowerShell (x86). When the given configuration doesn't match anything, it defaults to the first PowerShell it finds.

Originally I made this case sensitive since, as user-defined monikers, that might be wanted. But I'll submit a PR to change it over.

@JustinGrote
Copy link
Collaborator Author

@rjmholt I wouldn't be surprised, half the reason I use Powershell is I suck at aligning cases :) I'll try to repro but I agree it should be case insensitive, since they are descriptors and not hard paths that might have issue cross platform e.g. on linux.

@ghost ghost added the Needs: Maintainer Attention Maintainer attention needed! label Jan 2, 2020
@SydneyhSmith SydneyhSmith removed the Needs: Maintainer Attention Maintainer attention needed! label Jan 6, 2020
@ghost ghost added Status: Fixed and removed Status: In PR labels Jan 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants