Skip to content

Commit

Permalink
fix: don't print if none selected
Browse files Browse the repository at this point in the history
  • Loading branch information
adamtabrams committed Jun 6, 2020
1 parent d8fe1b1 commit 57d98c6
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
11 changes: 10 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [0.2.2] - 2020-06-06
### Fixed
- Don't print an error if the user doesn't select a key.
- Add changelog to the project.

### Changed
- Clean up usage printout.

## [0.2.1] - 2020-05-27
### Changed
- Removed uses of expr command.
Expand All @@ -27,7 +35,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Command to modify a key.
- Help flag to see basic usage.

[Unreleased]: https://github.com/adamtabrams/keys/compare/0.2.1...HEAD
[Unreleased]: https://github.com/adamtabrams/keys/compare/0.2.2...HEAD
[0.2.2]: https://github.com/adamtabrams/keys/compare/0.2.1...0.2.2
[0.2.1]: https://github.com/adamtabrams/keys/compare/0.2.0...0.2.1
[0.2.0]: https://github.com/adamtabrams/keys/compare/0.1.0...0.2.0
[0.1.0]: https://github.com/adamtabrams/keys/releases/tag/0.1.0
5 changes: 2 additions & 3 deletions keys
Original file line number Diff line number Diff line change
Expand Up @@ -128,8 +128,6 @@ remove_key() {

[ "$confirm_del" = y ] &&
rm "$vault/$sel_key" && echo "key removed"

echo "done"
}

[ "$1" = "add" ] && add_key "$@" && exit 0
Expand All @@ -144,7 +142,8 @@ clipboard=$(set_clipboard)
[ ! "$clipboard" ] && echo "couldn't detect clipboard" >&2 && exit 1

sel_key=$(select_key)
[ ! "$sel_key" ] && echo "invalid entry" >&2 && exit 1
[ ! "$sel_key" ] && exit 0
# [ ! "$sel_key" ] && echo "invalid entry" >&2 && exit 1

key_text=$(gpg --decrypt "$vault/$sel_key" 2> /dev/null)
[ ! "$key_text" ] && echo "decrypt failed" >&2 && exit 1
Expand Down

0 comments on commit 57d98c6

Please sign in to comment.