Skip to content

Commit

Permalink
feat: add trap (ERR)
Browse files Browse the repository at this point in the history
  • Loading branch information
nanai10a committed Jun 19, 2024
1 parent 8d534ac commit 85aaef9
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions download_font.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@

set -e

function failed () {
info 0
info 2 "unexpected exitcode! exiting..."
}

trap failed ERR

export TERM="${TERM:-xterm-256color}"

function info () {
Expand Down

0 comments on commit 85aaef9

Please sign in to comment.