summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/cmd.sh4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/cmd.sh b/src/cmd.sh
index a42744d..e50b870 100644
--- a/src/cmd.sh
+++ b/src/cmd.sh
@@ -108,6 +108,7 @@ run_cmd()
{
local cmd="${1}"
local cmd_clean=
+ local es=
shift
cmd_clean="$(printf '%s' "${cmd}" | \
@@ -116,6 +117,7 @@ run_cmd()
running_cmd="${cmd}"
running_cmd_clean="${cmd_clean}"
"cmd_${cmd_clean}_main" "${@}"
+ es=${?}
running_cmd=''
running_cmd_clean=''
else
@@ -123,5 +125,5 @@ run_cmd()
return 1
fi
- return 0
+ return ${es}
}