Skip to content

Commit

Permalink
Fixed error reported by decrypt --template in case of unsuccessful de…
Browse files Browse the repository at this point in the history
…cryption
  • Loading branch information
shyiko committed Dec 27, 2017
1 parent b6b26ac commit 5e9baeb
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ 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).

## [0.4.2] - 2017-12-27

### Fixed
- Error reported by `kubesec decrypt --template=...` when data cannot be decrypted.

## [0.4.1] - 2017-11-29

### Fixed
Expand Down Expand Up @@ -69,6 +74,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

## 0.1.0 - 2017-08-11

[0.4.2]: https://github.com/shyiko/kubesec/compare/0.4.1...0.4.2
[0.4.1]: https://github.com/shyiko/kubesec/compare/0.4.0...0.4.1
[0.4.0]: https://github.com/shyiko/kubesec/compare/0.3.1...0.4.0
[0.3.1]: https://github.com/shyiko/kubesec/compare/0.3.0...0.3.1
Expand Down
3 changes: 3 additions & 0 deletions kubesec.go
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,9 @@ func main() {
} else {
data, _, err = kubesec.Decrypt(resource)
}
if err != nil {
log.Fatal(err)
}
if tpl, _ := cmd.Flags().GetString("template"); tpl != "" {
t, err := template.New("template").Option("missingkey=error").Parse(tpl)
if err != nil {
Expand Down

0 comments on commit 5e9baeb

Please sign in to comment.