为什么capistrano 3链接的文件在试运行时失败



当我运行bundle exec cap production deploy:check:linked_files时,我获得了成功,但如果我添加-干运行进行测试,它就会失败。

参见输出:

bundle exec cap production deploy:check:linked_files

DEBUG [c593caa5] Running /usr/bin/env [ -f /home/app/www/shared/config/database.yml ] as app@xxx.xxx.xxx.xxx
DEBUG [c593caa5] Command: [ -f /home/app/www/shared/config/database.yml ]
DEBUG [c593caa5] Finished in 3.206 seconds with exit status 0 (successful).
DEBUG [9619277e] Running /usr/bin/env [ -f /home/app/www/shared/config/mongoid.yml ] as app@xxx.xxx.xxx.xxx
DEBUG [9619277e] Command: [ -f /home/app/www/shared/config/mongoid.yml ]
DEBUG [9619277e] Finished in 0.304 seconds with exit status 0 (successful).

以及——试运行:

bundle exec cap production deploy:check:linked_files --dry-run

DEBUG [26483ac3] Running /usr/bin/env [ -f /home/app/www/shared/config/database.yml ] as app@xxx.xxx.xxx.xxx
DEBUG [26483ac3] Command: [ -f /home/app/www/shared/config/database.yml ]
ERROR linked file /home/app/www/shared/config/database.yml does not exist on xxx.xxx.xxx.xxx

这是意料之中的还是某种错误?

由于--dry-run在Capistrano中的工作方式,这是一个错误。在试运行期间,所有test命令都返回false。因此,Capistrano认为链接的文件不存在,因此放弃了。

https://github.com/capistrano/capistrano/issues/1565

最新更新