用一个简单的食谱测试 capistrano。
$ cap deploy:setup
* executing `deploy:setup'
* executing "sudo -p 'sudo password: ' mkdir -p /u/apps/ [..]
[..]
deploy:setup
按预期工作。
然而
$ cap deploy:check
* executing `deploy:check'
* executing "test -d /u/apps/[..]
[..]
运行时deploy:check
出现以下错误:
The following dependencies failed. Please check them and try again:
--> You do not have permissions to write to `/u/apps/
[..]
--> `/u/apps/app/shared is not writable [..]
似乎 capistrano 在deploy:check
模式下没有使用 sudo 。
我不明白!
虽然在deploy:setup
整个目录结构中是由 capistrano 创建的而没有任何问题?
为什么 capistrano 不使用 sudo deploy:check
?