summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorPatrick McDermott <patrick.mcdermott@libiquity.com>2019-01-05 11:07:20 (EST)
committer Patrick McDermott <patrick.mcdermott@libiquity.com>2019-01-05 11:07:20 (EST)
commita343bb1d182ec1141fb45f26dfe1858623428db2 (patch)
treebb285c494119709e33f0a492e785031addb8ae8a /lib
parent253328e2651384dbdfaa06dc153268bc17ad840b (diff)
ob_parse_control(): Replace [ commands after callbacks
Diffstat (limited to 'lib')
-rw-r--r--lib/control.sh6
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/control.sh b/lib/control.sh
index 234a375..524c504 100644
--- a/lib/control.sh
+++ b/lib/control.sh
@@ -120,8 +120,7 @@ ob_parse_control()
;;
[!\ ]*':'*) # "Name: Value" line.
if [ -n "${name}" ]; then
- "${field_cb}" "${name}" "${value}" "${user_data}"
- if [ ${?} -ne 0 ]; then
+ if ! "${field_cb}" "${name}" "${value}" "${user_data}"; then
return 0
fi
fi
@@ -172,8 +171,7 @@ ${line# }"
EOF
if [ -n "${name}" ]; then
- "${field_cb}" "${name}" "${value}" "${user_data}"
- if [ ${?} -ne 0 ]; then
+ if ! "${field_cb}" "${name}" "${value}" "${user_data}"; then
return 0
fi
fi