ScoopInstaller / Scoop

A command-line installer for Windows.
https://scoop.sh
Other
20.96k stars 1.4k forks source link

.msi downloads blocked by policy cause uncaught errors #878

Closed guillermooo closed 8 years ago

guillermooo commented 8 years ago

Proof of policy issue:

scoop master % = $ iwr http://www.7-zip.org/a/7z1602-x64.msi
iwr :
Access Denied (policy_denied)
The filetype you would like to download has been blocked by the policy.
[snip]

Actual issue:

scoop master % = $ scoop install (gi .\bucket\7zip.json | cvpa)
installing 7zip (16.02)
downloading http://www.7-zip.org/a/7z1602-x64.msi...
DEBUG: http://www.7-zip.org/a/7z1602-x64.msi /// C:\users\FOOBAR\AppData\Local\scoop\cache\7zip#16.02#http_www.7-zip.org_a_7z1602-x64.msi.download
Exception calling "DownloadFile" with "2" argument(s): "The remote server returned an error: (403) Forbidden."
[snip]

Scoop ignores the exception and that creates a cascade of other exceptions because files don't exist where it expects them.

lukesampson commented 8 years ago

Can you tell us how to set up a policy that reproduces this situation?

guillermooo commented 8 years ago

It seems the check is based on an external service for categorization of online content. I don't think scoop can do anything about it, but it should probably catch the error.

guillermooo commented 8 years ago

BTW, those above might be two separate errors, but I don't think so.

lukesampson commented 8 years ago

I think I fixed it. It's working with a generic 403 status code at least. Output should look something like this:

~ $ scoop install 7zorp
installing 7zorp (16.02)
downloading http://httpstat.us/403...The remote server returned an error: (403) Forbidden.