我启动并运行了第一个hubot,并根据现有示例编写了我的前几个脚本.我希望与hubot集成的现有工作流基本上基于几个shell脚本,每个脚本执行一个任务.任务可能相对复杂(git / svn checkout,使用gcc编译代码并运行它).如何用hubot执行bash脚本?我见过this question,但它只涉及简单的命令,如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权限),并导出HUBOT\_LOG\_LEVEL =“debug”.
我正在使用拥有bash脚本的同一用户运行hubot.
谢谢.

解决方法:


供参考:答案是

build = spawn '/bin/bash', ['test.sh']

长音

标签: shell, bash, linux, coffeescript, hubot

相关文章推荐

添加新评论,含*的栏目为必填