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

Winget failing in Powershell 7.2.6 #2520

Open
wstr-ncrum opened this issue Sep 16, 2022 · 3 comments
Open

Winget failing in Powershell 7.2.6 #2520

wstr-ncrum opened this issue Sep 16, 2022 · 3 comments
Labels
Issue-Bug It either shouldn't be doing this or needs an investigation.
Milestone

Comments

@wstr-ncrum
Copy link

wstr-ncrum commented Sep 16, 2022

Winget works with default powershell instance using 5.1 on Windows 10 professional. After installing powershell 7 I attempted running any commands including winget --version and they all fail with the same message as shown below.

edit: only happening in Admin launched prompts

image

@ghost ghost added the Needs-Triage Issue need to be triaged label Sep 16, 2022
@wstr-ncrum wstr-ncrum changed the title Winget failing in Powershell 7.26 Winget failing in Powershell 7.2.6 Sep 16, 2022
@wstr-ncrum
Copy link
Author

Same terminal different version of powershell

image

@denelon
Copy link
Contributor

denelon commented Sep 16, 2022

I hate to ask, but did you try restarting the terminal and/or Windows? I'll try to reproduce this.

I just had PowerShell 5.1:

 denelon   ~    $PSVersionTable.PSVersion                                                   in pwsh at 08:28:43

Major  Minor  Build  Revision
-----  -----  -----  --------
5      1      25201  1000

I installed the latest version and restarted Windows Terminal:

PS C:\Users\denelon> $PSVersionTable.PSVersion

Major  Minor  Patch  PreReleaseLabel BuildLabel
-----  -----  -----  --------------- ----------
7      2      6

winget worked:

PS C:\Users\denelon> winget -v
v1.4.2161-preview

@denelon denelon added Issue-Bug It either shouldn't be doing this or needs an investigation. and removed Needs-Triage Issue need to be triaged labels Sep 16, 2022
@wstr-ncrum
Copy link
Author

I did do a restart. Did you run the version as administrator as well. That seems to be the thing for me. If I launch Windows terminal as admin and use powershell 7 it doesn't work

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Issue-Bug It either shouldn't be doing this or needs an investigation.
Projects
None yet
Development

No branches or pull requests

2 participants