From 87a6f08607b790c8d867b98fab6e99b163fc2101 Mon Sep 17 00:00:00 2001 From: "Zhuohuan LI (CARPE DIEM)" Date: Thu, 3 Nov 2016 05:23:30 +0000 Subject: [PATCH] fix `can only "return" from a function or sourced script` error --- bin/entrypoint.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bin/entrypoint.sh b/bin/entrypoint.sh index 907fba96..3ca0eed3 100755 --- a/bin/entrypoint.sh +++ b/bin/entrypoint.sh @@ -118,7 +118,8 @@ function wechaty::runBot() { echo "Executing ts-node $*" local -i ret=0 - ts-node "$@" || ret=$? + ts-node "$@" & + wait "$!" || ret=$? # fix `can only `return' from a function or sourced script` error case "$ret" in 0) -- GitLab