download_strategy: use (more consistent) TypeError.

Rather than a base `RuntimeError`.

Fixes https://github.com/Homebrew/brew/issues/6839
This commit is contained in:
Mike McQuaid 2019-12-16 11:34:31 +00:00
parent d556d02cd4
commit dccedbf104
No known key found for this signature in database
GPG Key ID: 48A898132FD8EE70

View File

@ -1122,7 +1122,7 @@ class DownloadStrategyDetector
when :post then CurlPostDownloadStrategy when :post then CurlPostDownloadStrategy
when :fossil then FossilDownloadStrategy when :fossil then FossilDownloadStrategy
else else
raise "Unknown download strategy #{symbol} was requested." raise TypeError, "Unknown download strategy #{symbol} was requested."
end end
end end
end end