troubleshoot
troubleshoot copied to clipboard
Installation failure (https://krew.sh/preflight 404)
curl https://krew.sh/preflight | bash is not currently working on OSX (with system curl 7.64.1 or brew curl 7.70.0) because the URL 404s
Referenced at: https://troubleshoot.sh/preflight/overview/ https://troubleshoot.sh/
The server sniffs the User-Agent to determine whether to serve the script or the website. Curl installed with Homebrew has a User-Agent User-Agent: Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Trident/5.0, which is interpreted as a browser. A workaround is to force the script with https://krew.sh/preflight?type=script.
@areed Since we don't actually serve an interesting web page if a browser hits https://krew.sh/preflight, why not just render the install script regardless of User-Agent? Is there some history where we used to display a plugin-specific webpage? In general, users have a reasonable concern to see the script before the pipe it to bash, and personally, I'd inspect it by viewing the URL with my browser. I wouldn't expect different content via curl.
@marccampbell Any reason not to remove the User-Agent check and return the script always?
@markpundsack i think our original intent was to generate a web page to show (similar to kURL), but we don't, so I don't have any objections to this
Yeah, the generated web page at the same URL is cute, but honestly I think it's probably best to put them under a subdirectory. It should be easy to inspect the generated script too.
This issue is >2 years old at this point, and I just tested and could not reproduce. I'll close it out, other changes have probably mopped this up.