matcha
matcha copied to clipboard
BUG: HTTP response status not checked in CLI install
Describe the bug
In cli/install.go:35-36, plugin download doesn't check HTTP status:
resp, err := client.Get(url)
if err != nil { return err }
data, err = io.ReadAll(resp.Body)
To reproduce
- Run
matcha install https://example.com/nonexistent-plugin - 404 page downloaded and treated as plugin file
Expected behavior
Check resp.StatusCode is 2xx. Show helpful error like 'plugin not found (HTTP 404)'.
Hi 👋 Can't reproduce the bug. Just built on master (db89465) and the result was:
$ ./bin/matcha install https://example.com/nonexistent-plugin
install failed: download returned status 404
Hi 👋 Can't reproduce the bug. Just built on master (db89465) and the result was:
$ ./bin/matcha install https://example.com/nonexistent-plugin install failed: download returned status 404
may have been fixed, closing the issue.
@volard feel free to pick up any other issue