Deployinator1.0.2版本的bug
2015-09-17 10:34
176 查看
今天按照部署文档安装Deployinator, 完成后最基本的test_stack都无法运行, 运行时报错误:
There was an error deploying. Please try again in a moment or there is already a deploy going
重复安装死活不行,只好去跟代码了,发现居然是本身的bug,bug,bug。
尼玛我下的是稳定版啊,怎么能出这种根本不能正常运行的bug?
出bug的代码在:
./vendor/bundle/ruby/1.9.1/bundler/gems/deployinator-140e6502636a/lib/deployinator/helpers/deploy.rb
或者可以搜索:is_deploy_active,这个函数原代码如下:
def is_deploy_active?(stack, stage)
if deployname = get_deploy_process_title(stack,stage)
return system("pgrep -f '#{deployname}'")
end
false
end
其中system("pgrep -f '#{deployname}'")是判断当前有没有发布正在进行,但是这个逻辑写反了,在ubuntu系统上,如果成功执行(找到了进程),system会返回0,即false;找不到进程的时候返回1,即ture,所以将结果进行‘非’操作后即可。
There was an error deploying. Please try again in a moment or there is already a deploy going
重复安装死活不行,只好去跟代码了,发现居然是本身的bug,bug,bug。
尼玛我下的是稳定版啊,怎么能出这种根本不能正常运行的bug?
出bug的代码在:
./vendor/bundle/ruby/1.9.1/bundler/gems/deployinator-140e6502636a/lib/deployinator/helpers/deploy.rb
或者可以搜索:is_deploy_active,这个函数原代码如下:
def is_deploy_active?(stack, stage)
if deployname = get_deploy_process_title(stack,stage)
return system("pgrep -f '#{deployname}'")
end
false
end
其中system("pgrep -f '#{deployname}'")是判断当前有没有发布正在进行,但是这个逻辑写反了,在ubuntu系统上,如果成功执行(找到了进程),system会返回0,即false;找不到进程的时候返回1,即ture,所以将结果进行‘非’操作后即可。
相关文章推荐
- 水面的简单渲染 – Gerstner波
- flex使用
- jqurey datatable tableTools 自定义button元素 以及按钮自事件
- 安卓、safari和微信各个浏览器的设计标准
- HDU 4288 Coder
- <Java 并发编程实践>读书笔记 --- 内部锁
- unity3d制作弧形血条,魔条
- javascript的防御式编程
- 怎样使用chrome调试前端html和css
- win8系统如何限制网速传输速度?win8系统限制网速传输速度的方法
- win10设置睡眠唤醒无需输入密码直接进入系统的方法
- VS2010中C#调用C函数
- js常用正则
- Windows + Git(msysgit) + TortoiseGit
- CSS让文本只显示一行,超出部分隐藏或以三个点结束
- POJ 1408:Fishnet
- 51oct视频学习网站
- Code::Blocks搭建OpenGL编程环境(着色器)
- The Swift Programming Language中国完整版
- iOS捕获系统异常