Skip to content

Commit

Permalink
remove custom die function
Browse files Browse the repository at this point in the history
  • Loading branch information
Mythra committed Nov 13, 2019
1 parent 4930c4a commit fbce8fd
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 5 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
## Unreleased

* Remove `die` function which it turns out isn't universal.

## 1.3.0 (October 14th, 2019)

* Split out trap functionality to: `sash-trap`
Expand Down
3 changes: 2 additions & 1 deletion sash-utils/choices.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@
# Instead you should be using something like:
# ```sh
# if ! _sash_get_multiline_content; then
# die "bleh"
# (>&2 echo "BLAH")
# return 10
# fi
# ```
_sash_get_multiline_input() {
Expand Down
12 changes: 8 additions & 4 deletions subcommands/sash-package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,8 @@ sash:package() {

if [[ "${__sash_parse_results[unsafe-no-sign]}" != "0" ]]; then
if ! hash keybase 2>/dev/null; then
die "Please install the Keybase CLI for generating packages."
(>&2 echo "Please install the Keybase CLI for generating packages.")
exit 10
fi
fi

Expand Down Expand Up @@ -189,7 +190,8 @@ sash:package() {
_sash_package_subcategory "$category" "$run_checks"

if [[ "$?" != "0" ]]; then
die "Failed to package subcategory!"
(>&2 echo "Failed to package subcategory!")
exit 10
fi
else
if [[ "${__sash_parse_results[full-category]}" == "0" ]]; then
Expand All @@ -198,7 +200,8 @@ sash:package() {
_sash_package_category "$category" "$run_checks"

if [[ "$?" != "0" ]]; then
die "Failed to package subcategory!"
(>&2 echo "Failed to package subcategory!")
exit 10
fi
else
if [[ "x${__sash_parse_results[subcategory]}" == "x" ]]; then
Expand All @@ -214,7 +217,8 @@ sash:package() {
_sash_package_subcategory "$tmp_cat_subcat" "$run_checks"

if [[ "$?" != "0" ]]; then
die "Failed to package!"
(>&2 echo "Failed to package!")
exit 10
fi
fi
fi
Expand Down

0 comments on commit fbce8fd

Please sign in to comment.