From 2e33cbe10097e861fbc7a2a9352b059cd0925fce Mon Sep 17 00:00:00 2001 From: Patrick McDermott Date: Sun, 17 Mar 2019 14:10:49 -0400 Subject: ob_get_*_parameter(): Avoid shell error on no such field --- (limited to 'lib') 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 } -- cgit v0.9.1