我如何设置shell来砸在Capistrano的运行吗? [英] How do I set the shell to bash for run in Capistrano?

查看:112
本文介绍了我如何设置shell来砸在Capistrano的运行吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我怎样才能设置在Capistrano的运行命令shell将使用bash而不是SH?
我试图安装RVM,我需要执行命令:

How can I set the shell in the Capistrano run command to use bash instead of sh? I am trying to install RVM and I need to execute the command:

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的是执行:

But I just can't seem to get it to work because Capistrano is executing:

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

我在Capistrano的宝石看到command.rb文件有一些code像

I see in the Capistrano gem the command.rb file has some code like

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

但我不清楚如何通过选项[:外壳] 的任务

推荐答案

设置:外壳不工作,但工作原理:

set :shell is not working, but that works:

default_run_options [:外壳] ='/斌/ bash的

这篇关于我如何设置shell来砸在Capistrano的运行吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆