我启动并运行了我的第一个 hubot,并根据现有示例编写了我的前几个脚本。我想与hubot集成的现有工作流程基本上基于几个shell脚本,每个脚本都执行一项任务。该任务可能相对复杂(git/svn checkout,使用 gcc 编译代码并运行它)。如何使用 hubot 执行 bash 脚本?我见过这个问题,但它只解决简单的命令,例如ls
. 我试过了
build = spawn 'source', ['test.sh']
build.stdout.on 'data', (data) -> msg.send data.toString()
build.stderr.on 'data', (data) -> msg.send data.toString()
没有任何运气:
Hubot> execvp(): Permission denied
我检查了明显的东西(-rwxr-xr-x
权限),并且export HUBOT_LOG_LEVEL="debug"
. 我正在使用拥有 bash 脚本的同一用户运行 hubot。谢谢。