Skip to content

Commit

Permalink
fix: improve sh_error, sh_fail functions - output errors to STDERR
Browse files Browse the repository at this point in the history
  • Loading branch information
seantrane committed May 6, 2022
1 parent 44870cf commit 2bff707
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion functions/sh_error
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

sh_error () {
# shellcheck disable=SC2059
printf "${ClearNewLine:-} [${Red:-} ER ${Reset:-}] ${Red:-}${1:-}${Reset:-} \\n"
printf "${ClearNewLine:-} [${Red:-} ER ${Reset:-}] ${Red:-}${1:-}${Reset:-} \\n" >&2
}

# shellcheck disable=SC2034
Expand Down
3 changes: 1 addition & 2 deletions functions/sh_fail
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@

sh_fail () {
# shellcheck disable=SC2059
printf "${ClearNewLine:-} [${Red:-}FAIL${Reset:-}] ${Red:-}${1:-}${Reset:-} \\n"
echo ''
printf "${ClearNewLine:-} [${Red:-}FAIL${Reset:-}] ${Red:-}${1:-}${Reset:-} \\n\\n" >&2
exit 2
}

Expand Down

0 comments on commit 2bff707

Please sign in to comment.