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:
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?
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: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?