summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPatrick McDermott <patrick.mcdermott@libiquity.com>2019-03-17 14:10:49 (EDT)
committer Patrick McDermott <patrick.mcdermott@libiquity.com>2019-03-17 14:10:49 (EDT)
commit2e33cbe10097e861fbc7a2a9352b059cd0925fce (patch)
tree4f40355efaff8352eee3b17353fb745f68f43741
parent2b00c30e0267e91f91f1657ee90bc98debf6450e (diff)
ob_get_*_parameter(): Avoid shell error on no such field
-rw-r--r--lib/package.sh6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/package.sh b/lib/package.sh
index 0c39ca4..2741bd3 100644
--- a/lib/package.sh
+++ b/lib/package.sh
@@ -186,7 +186,8 @@ ob_get_source_parameter()
EOF
)"
- eval "printf '%s' \"\${_OB_SRCFIELD_${name}}\""
+ # TODO: Return error on no such field?
+ eval "printf '%s' \"\${_OB_SRCFIELD_${name}-}\""
return 0
}
@@ -224,7 +225,8 @@ ob_get_binary_parameter()
EOF
)"
- eval "printf '%s' \"\${_OB_BINFIELD_${package}_${name}}\""
+ # TODO: Return error on no such field?
+ eval "printf '%s' \"\${_OB_BINFIELD_${package}_${name}-}\""
return 0
}