Closed MitushYadav closed 2 years ago
I saw you had something similar for the string split in v1.1.1. Any reason for changing it?
One of the challenges of using regex is that you expect output the be consistent. Sometimes it isn't. Let me see what I can do.,
The first time I tried the command I got the same results you did. But when I ran it again, it worked.
Not every package provides all details but this looks like it is working. The first time you run winget
after some unknown period of time, It writes other output which I thought I had accounted for. I hadn't used winget in several days so initially got your result. But running it a second time and everything worked.
But I can see now that publisher info isn't properly parsing.
I had something else in mind for parsing out the publisher data but apparently, I didn't think it all the way through. Working on an update that should work.
Update the module to v1.3.0 and see if it works better for you.
Updated to v1.3.0 and I get the required output. Thanks!
Describe the problem
Running
Get-WGPackage -id 'putty.putty'
returnsName : PuTTY ID : PuTTY.PuTTY Version : Publisher : PublisherURL : PublisherSupport : Author : Moniker : Description : Homepage :
Expectation
The command should return more details.
Additional Information
winget v1.2.10271
I looked into the private.ps1 and these could be the potential fixes:
functions\private.ps1 $value = $find.split("$($key):")[1].trim() => $value = $($find -split "$($key):")[1].trim()
The string for Publisher Url do not match: PublisherURL => Publisher Url PublisherSupport => Publisher Support Url reference: winget-pkgs
PowerShell version
5.1
Platform
Windows 10 Pro or Enterprise
Additional Checks