Skip to content

Commit

Permalink
Handle an unhandled error in dasel.Select()
Browse files Browse the repository at this point in the history
  • Loading branch information
TomWright committed May 31, 2023
1 parent 7b3a782 commit 77eab5c
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
9 changes: 8 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

- Nothing yet.

## [v2.3.3] - 2023-05-31

### Fixed

- Errors when selecting data are now correctly handled.

## [v2.3.2] - 2023-05-31

### Fixed
Expand Down Expand Up @@ -581,7 +587,8 @@ See [documentation](https://daseldocs.tomwright.me) for all changes.

- Everything!

[unreleased]: https://github.com/TomWright/dasel/compare/v2.3.2...HEAD
[unreleased]: https://github.com/TomWright/dasel/compare/v2.3.3...HEAD
[v2.3.3]: https://github.com/TomWright/dasel/compare/v2.3.2...v2.3.3
[v2.3.2]: https://github.com/TomWright/dasel/compare/v2.3.1...v2.3.2
[v2.3.1]: https://github.com/TomWright/dasel/compare/v2.3.0...v2.3.1
[v2.3.0]: https://github.com/TomWright/dasel/compare/v2.2.0...v2.3.0
Expand Down
3 changes: 3 additions & 0 deletions internal/command/select.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,9 @@ func runSelectCommand(opts *selectOptions, cmd *cobra.Command) error {
}

values, err := dasel.Select(rootValue, opts.Selector)
if err != nil {
return err
}

if err := opts.Write.writeValues(cmd, opts.Read, values); err != nil {
return err
Expand Down

0 comments on commit 77eab5c

Please sign in to comment.