Skip to content

Commit

Permalink
fix: correct to inherit_errexit in hledger-bar
Browse files Browse the repository at this point in the history
I misread something and apparently whatever test I used didn't fail because what's there now is not valid at all.
  • Loading branch information
colindean authored Feb 18, 2024
1 parent f706bd2 commit 8d87049
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bin/hledger-bar
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ EOS
${cmd} | while IFS=, read -r period amount; do
if [[ ! ${amount} =~ [0-9] ]]; then continue; fi # ignore lines where amount has no digits
if [[ ${amount} =~ , ]]; then printamterr "${amount}"; exit 1; fi # check there is a single amount column
set -o inherit_exit
shopt -s inherit_errexit
int=$(printf '%.f' "$(unquote "${amount}")")
if [[ ${shownum} -gt 0 ]]; then num=$(printf "%10d " "${int}"); else num=""; fi
if [[ ${int} -lt 0 ]]; then c="${negchar}"; col=${red}; else c="${poschar}"; col=${green}; fi
Expand Down

0 comments on commit 8d87049

Please sign in to comment.