提交 abb3645d 编写于 作者: Huan (李卓桓)'s avatar Huan (李卓桓)

better to find bot.ts file

上级 2a6655ff
......@@ -32,14 +32,16 @@ fi
if [[ "$1" == *.ts || "$1" == *.js ]]; then
appFile="/app/$1"
botFile="$1"
botFilePath="/bot/$1"
shift
if [ -f "$appFile" ]; then
echo "Executing ts-node /app/$@"
exec ts-node "/app/$@"
if [ -f "$botFilePath" ]; then
echo "Executing ts-node $botFilePath $@"
exec ts-node "$botFilePath" $@
exit $?
else
echo "ERROR: can not found app file: $appfile"
echo "ERROR: can not found bot file: $botFile"
exit -1
fi
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册