-
Notifications
You must be signed in to change notification settings - Fork 145
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
Update Get-WingetCmd.ps1 #817
base: main
Are you sure you want to change the base?
Update Get-WingetCmd.ps1 #817
Conversation
Missing failsafe when winget does not exist in system context (trigger for fallback to instance in the user context). Addendum to logic changed in PR Romanitho#789
..I need vacation
Got an explanation from Claude: In PowerShell, In your specific example: $WingetInfo = (Get-Item -Path $ps -ErrorAction Break).VersionInfo | Sort-Object -Property FileVersionRaw -Descending | Select-Object -First 1
It's a nuanced behavior that isn't always consistent across all PowerShell contexts, but in Try blocks and certain loop structures, |
But; with |
This works for both SYSTEM/User (your original without -EA):
Or:
Or revert to @Romanitho original... DeepSeek said: |
Proposed Changes
Related Issues
#789