You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Oct 24, 2024. It is now read-only.
I came across this today when trying to use this module to download a git repo's zip file.
I think to support this, you could use a different web client or take in a new param to hold the query-string (and add that object to the webclient request).
The text was updated successfully, but these errors were encountered:
Tried downloading Windows ADK and it fails, but I don't think that the problem is the webclient (System.Net.WebClient), as it works when launched from PowerShell:
But if the URL doesn't end with a filename, the code pasted above could led to unexpected results. Let's use the Windows ADK download URL as an example:
$url = 'https://go.microsoft.com/fwlink/p/?linkid=859206'$filename = regsubst($url, '^http.*\/([^\/]+)$', '\1')
# Now $filename has the value '?linkid=859206'
Windows can't create a file that has the ? character in the name, and that's why the module fails with those URLs.
The same URL ending with a filename should work:
$url = 'https://go.microsoft.com/fwlink/p/?linkid=859206/test.exe'$filename = regsubst($url, '^http.*\/([^\/]+)$', '\1')
# Now $filename has the value 'test.exe'
So, if the URL doesn't end with a filename, the parameter destination_file should be mandatory to avoid strange filenames or errors. The documentation should be updated to explain this.
I came across this today when trying to use this module to download a git repo's zip file.
I think to support this, you could use a different web client or take in a new param to hold the query-string (and add that object to the webclient request).
The text was updated successfully, but these errors were encountered: