Skip to content

Commit

Permalink
Fix url; add changelog
Browse files Browse the repository at this point in the history
  • Loading branch information
hypnoglow committed Nov 2, 2019
1 parent 826c6eb commit 937e316
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

## [Unreleased]

### Fixed

- Fixed incorrect s3 url when "proxy" runs on uninitialized repository.
[Refs: [#77](https://github.com/hypnoglow/helm-s3/issues/77) [#78](https://github.com/hypnoglow/helm-s3/pull/78)] [@horacimacias](https://github.com/horacimacias)

## [0.8.0]

### Added
Expand Down
7 changes: 6 additions & 1 deletion cmd/helms3/proxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,12 @@ func (act proxyCmd) Run(ctx context.Context) error {
b, err := storage.FetchRaw(ctx, act.uri)
if err != nil {
if strings.HasSuffix(act.uri, indexYaml) && err == awss3.ErrObjectNotFound {
return fmt.Errorf("The index file does not exist by the path %s. If you haven't initialized the repository yet, try running \"helm s3 init %s\"", act.uri, act.uri[0:len(indexYaml)])
return fmt.Errorf(
"The index file does not exist by the path %s. "+
"If you haven't initialized the repository yet, try running \"helm s3 init %s\"",
act.uri,
strings.TrimSuffix(strings.TrimSuffix(act.uri, indexYaml), "/"),
)
}
return errors.WithMessage(err, "fetch from s3")
}
Expand Down

0 comments on commit 937e316

Please sign in to comment.