Skip to content

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

@asottile-sentry

Description

@asottile-sentry

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions