summaryrefslogtreecommitdiffstats
path: root/src/main.sh
diff options
context:
space:
mode:
authorP. J. McDermott <pj@pehjota.net>2016-01-17 10:28:26 (EST)
committer P. J. McDermott <pj@pehjota.net>2016-01-17 10:28:26 (EST)
commit9346b9c6eb26b71dd9a7f93440007e07d0f89298 (patch)
tree8bb369d1a616065ea4aecc942fa27e72cfe06041 /src/main.sh
parent03f6b3e526edc8e03ef19755af4297dc6b80373d (diff)
main(): Check return value of *_vardata()
Diffstat (limited to 'src/main.sh')
-rw-r--r--src/main.sh8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/main.sh b/src/main.sh
index de7e8f6..51b21ac 100644
--- a/src/main.sh
+++ b/src/main.sh
@@ -63,7 +63,9 @@ main()
fi
srand $(expr ${$} + $(date '+%s'))
- init_vardata
+ if ! init_vardata; then
+ return 2
+ fi
case "${cmd}" in
'help'|'version') ;;
@@ -77,7 +79,9 @@ main()
run_cmd "${cmd}" "${@}"
es=${?}
- fini_vardata
+ if ! fini_vardata; then
+ return 2
+ fi
return ${es}
}