Skip to content

Commit 4c15cfb

Browse files
colindeansimonmichael
authored andcommitted
fix: correct to inherit_errexit in hledger-bar
I misread something and apparently whatever test I used didn't fail because what's there now is not valid at all.
1 parent f706bd2 commit 4c15cfb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

bin/hledger-bar

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ EOS
124124
${cmd} | while IFS=, read -r period amount; do
125125
if [[ ! ${amount} =~ [0-9] ]]; then continue; fi # ignore lines where amount has no digits
126126
if [[ ${amount} =~ , ]]; then printamterr "${amount}"; exit 1; fi # check there is a single amount column
127-
set -o inherit_exit
127+
shopt -s inherit_errexit
128128
int=$(printf '%.f' "$(unquote "${amount}")")
129129
if [[ ${shownum} -gt 0 ]]; then num=$(printf "%10d " "${int}"); else num=""; fi
130130
if [[ ${int} -lt 0 ]]; then c="${negchar}"; col=${red}; else c="${poschar}"; col=${green}; fi

0 commit comments

Comments
 (0)