Skip to content

Commit

Permalink
feat: Add warning macro (#582)
Browse files Browse the repository at this point in the history
  • Loading branch information
kroese committed Jan 19, 2024
1 parent bd4a23b commit 89ae24a
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/reset.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ set -Eeuo pipefail

info () { printf "%b%s%b" "\E[1;34m❯ \E[1;36m" "$1" "\E[0m\n"; }
error () { printf "%b%s%b" "\E[1;31m❯ " "ERROR: $1" "\E[0m\n" >&2; }
warn () { printf "%b%s%b" "\E[1;31m❯ " "Warning: $1" "\E[0m\n" >&2; }

trap 'error "Status $? while: $BASH_COMMAND (line $LINENO/$BASH_LINENO)"' ERR

Expand Down

0 comments on commit 89ae24a

Please sign in to comment.