diff --git a/bin/entrypoint.sh b/bin/entrypoint.sh index ca440372a1d5d0496b585f64edb86fb14cd3485c..366c8d34b9791ced33f2a6007bb515415e6b7534 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