Merge pull request #572 from stevvooe/fetcher-concurrency-bug
cmd/dist/fetch: address subtle concurrency bug
This commit is contained in:
commit
c2c057a5db
1 changed files with 3 additions and 3 deletions
6
cmd/dist/fetch.go
vendored
6
cmd/dist/fetch.go
vendored
|
@ -139,11 +139,11 @@ func getResolver(ctx contextpkg.Context) (remotes.Resolver, error) {
|
||||||
}
|
}
|
||||||
|
|
||||||
for _, path := range paths {
|
for _, path := range paths {
|
||||||
base.Path = path
|
url := base
|
||||||
url := base.String()
|
url.Path = path
|
||||||
log.G(ctx).WithField("url", url).Debug("fetch content")
|
log.G(ctx).WithField("url", url).Debug("fetch content")
|
||||||
|
|
||||||
req, err := http.NewRequest(http.MethodGet, url, nil)
|
req, err := http.NewRequest(http.MethodGet, url.String(), nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue