如何将shell设置为bash以在Capistrano中运行?

前端之家收集整理的这篇文章主要介绍了如何将shell设置为bash以在Capistrano中运行?前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
如何在Capistrano运行命令中设置shell来使用bash而不是sh?
我正在尝试安装RVM,我需要执行命令:
run "bash < <(curl -L http://bit.ly/rvm-install-system-wide)"

如:

task :install_rvm,:roles => :server do
  apps = %w(bison openssl libreadline6 libreadline6-dev zlib1g zlib1g-dev libssl-dev     libyaml-dev sqlite3 libsqlite3-0 libxml2-dev libxslt-dev autoconf subversion libcurl4-openssl-dev)
  apt.install( {:base => apps},:stable )
  run "bash < <(curl -L http://bit.ly/rvm-install-system-wide)"
  run "rvm install 1.9.2".sh
  run "rvm use 1.9.2@global"
  run "gem install awesome_print map_by_method wirble bundler builder pg cheat"
  run "gem install -v2.1.2 builder"
  # modify .bashrc
end

但是,由于Capistrano正在执行,我似乎无法让它上​​班:

"sh -c 'bash < <(curl -L http://bit.ly/rvm-install-system-wide)'" on ubuntu@ec2...

我在Capistrano gem中看到command.rb文件有一些代码

shell = "#{options[:shell] || "sh"} -c"

但是我不清楚如何将选项[:shell]传递给任务

设置:shell不工作,但工作原理:

default_run_options [:shell] =’/ bin / bash’

猜你在找的Bash相关文章