在Capistrano 2中,您可以这样做:
set :default_environment, {
'PATH' => '$PATH:/opt/rubies/ruby-2.1.1/bin'
}
第3章中有类似的内容吗?
发布于 2014-06-01 16:16:31
发布于 2017-02-17 05:38:33
也许有点晚但是..。
Capistrano 3对环境使用专门的语法。
on roles :app do
with some_env: "foobar" do
...
end
end
在上面的示例中,在with/end块中,capistrano将环境变量SOME_ENV设置为"foobar“。
请参阅https://github.com/capistrano/sshkit#users-working-directories-environment-variables-and-umask
https://stackoverflow.com/questions/23985702
复制