Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fetch can cache an error page for a plugin download #48

Open
asottile-sentry opened this issue Feb 17, 2023 · 0 comments
Open

fetch can cache an error page for a plugin download #48

asottile-sentry opened this issue Feb 17, 2023 · 0 comments

Comments

@asottile-sentry
Copy link

asottile-sentry commented Feb 17, 2023

I'm using the tool built from 085ab00

apologies I don't have too much more details than this --

$ gocd configrepo --yaml fetch
Downloading https://github.com/tomzo/gocd-yaml-config-plugin/releases/download/0.14.1/yaml-config-plugin-0.14.1.jar                              
  Fetched 212 B/212 B (100.0%) complete
$ echo $?
0

the 212B response is an error from github

I think it's because the status code is not checked here?

err = dub.New().Get(url).Do(func(res *dub.Response) (err error) {

later invocations will fail with something like:

Could not find plugin "yaml.config.plugin" in your plugin path.
	Attempting to download plugin "yaml.config.plugin"...
zip: not a valid zip file
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant