From 4218dad272cbc9680aee35249862abc5a8dac925 Mon Sep 17 00:00:00 2001 From: "Zhuohuan LI (CARPE DIEM)" Date: Tue, 1 Nov 2016 10:22:07 +0800 Subject: [PATCH] better error help message for --volume mistake #66 --- bin/entrypoint.sh | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/bin/entrypoint.sh b/bin/entrypoint.sh index ca440372..366c8d34 100755 --- a/bin/entrypoint.sh +++ b/bin/entrypoint.sh @@ -17,7 +17,7 @@ figlet ChatBots echo echo -n "Starting Wechaty ... " -VERSION=$(wechaty-version 2>/dev/null) +VERSION=$(wechaty-version 2>/dev/null || echo '0.0.0(unknown)') echo "v$VERSION" echo @@ -53,6 +53,26 @@ if [[ "$1" == *.ts || "$1" == *.js ]]; then exit $ret else echo "ERROR: can not found bot file: $botFile" + figlet " Troubleshooting " + cat <<'TROUBLESHOOTING' + + Troubleshooting: + + 1. Did you bind the current directory into container? + + check your `docker run ...` command, if there's no `volumn` arg, + then you need to add one to bind the volume of /bot: + + `--volume="$PWD":/bot` + + this will let the container visit your current directory. + + if you still have issue, please have a look at + https://github.com/wechaty/wechaty/issues/66 + and do a search in issues, that might be help. + +TROUBLESHOOTING + exit -1 fi -- GitLab