Sha256: 46d2cc7e3f0d521fbcea7975fe63b39e6bc21440d0c1be749d4a4512d34952fe

Contents?: true

Size: 474 Bytes

Versions: 8

Compression:

Stored size: 474 Bytes

Contents

require 'rvm/capistrano/helpers/base'
require 'rvm/capistrano/helpers/rvm_if_sudo'
require 'rvm/capistrano/helpers/quote_and_escape'

rvm_with_capistrano do

  def with_rvm_group(command, options = {})
    if need_root(options)
      rvm_user_command + <<-CODE
if id | grep ' groups=.*(rvm)' >/dev/null ;
then #{command} ;
else #{rvm_if_sudo(options.merge(:deferred => true))} sg rvm -c #{quote_and_escape(command)} ;
fi
      CODE
    else
      command
    end
  end

end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
rvm-capistrano-1.5.6 lib/rvm/capistrano/helpers/with_rvm_group.rb
rvm-capistrano-1.5.5 lib/rvm/capistrano/helpers/with_rvm_group.rb
rvm-capistrano-1.5.4 lib/rvm/capistrano/helpers/with_rvm_group.rb
rvm-capistrano-1.5.3 lib/rvm/capistrano/helpers/with_rvm_group.rb
rvm-capistrano-1.5.2 lib/rvm/capistrano/helpers/with_rvm_group.rb
rvm-capistrano-1.5.1 lib/rvm/capistrano/helpers/with_rvm_group.rb
rvm-capistrano-1.5.0 lib/rvm/capistrano/helpers/with_rvm_group.rb
rvm-capistrano-1.5.0.rc1 lib/rvm/capistrano/helpers/with_rvm_group.rb