我启动并运行了第一个hubot,并根据现有示例编写了前几个脚本。我想与hubot集成的现有工作流程基本上是基于几个shell脚本,每个脚本执行一项任务。该任务可能相对复杂(git / svn检出,使用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。谢谢。
供参考:答案是
build = spawn '/bin/bash', ['test.sh']
大啊
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句