From bb98b3a3c74344d58af1b311e5fb515dfa6ced61 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lucio=20Andr=C3=A9s=20Illanes=20Albornoz=20=28arab=2C=20vx?= =?UTF-8?q?p=29?= Date: Sun, 3 Dec 2017 21:04:55 +0000 Subject: subr/ex_rtl.subr:-ex_rtl_try_run(): remove explicit exit & respect set -o errexit constraints. --- subr/ex_rtl.subr | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'subr') diff --git a/subr/ex_rtl.subr b/subr/ex_rtl.subr index cd9d1bee..ecca3c80 100644 --- a/subr/ex_rtl.subr +++ b/subr/ex_rtl.subr @@ -10,7 +10,7 @@ ex_rtl_dirname() { echo "${1%/*}"; }; ex_rtl_get_var_unsafe() { eval echo \${${1}}; }; ex_rtl_pop_IFS() { IFS="${EXP_RTL_IFS}"; }; ex_rtl_push_IFS() { EXP_RTL_IFS="${IFS}"; IFS="${1}"; }; -ex_rtl_try_run() { ex_rtl_test_cmd "${1}" && { "${@}" || exit ${?}; }; }; +ex_rtl_try_run() { if ex_rtl_test_cmd "${1}"; then "${@}"; fi; }; ex_rtl_set_var_unsafe() { [ -n "${2}" ] && eval ${1}=\"${2}\" || return 0; }; ex_rtl_test_cmd() { command -v "${1}" >/dev/null; }; ex_rtl_toupper() { echo "${1}" | tr a-z A-Z; }; -- cgit v1.2.3