majkinetor / au

Chocolatey Automatic Package Updater Module
GNU General Public License v2.0
227 stars 71 forks source link

Update-Package Unknown file type #207

Closed jonasw234 closed 4 years ago

jonasw234 commented 4 years ago

I’m trying to create an au package for the 0patch agent. When I use PowerShell to download the latest release using Invoke-WebRequest -Uri https://dist.0patch.com/download/latestagent -UseBasicParsing it works as intended and I receive the file with the filename in the response headers:

RawContent        : [...]
                    Content-Disposition: attachment; filename=0PatchInstaller_19.11.15.10650.msi

However when I use Update-Package to let au update an old version of the package, it seems like the filename is not read from the headers but from the URL so it fails with the “Unknown file type” exception. Is there a way to make au read the filename from the headers instead of from the URL?

majkinetor commented 4 years ago

Not currently. You should disable those checks and do them yourself the way you want it.

jonasw234 commented 4 years ago

Ok, thanks, I’ll try that!