Ruby on Rails | Screencasts | Download | Documentation | Weblog | Community | Source

Ticket #9290 (closed enhancement: fixed)

Opened 1 year ago

Last modified 1 year ago

Capistranos use of remote shell should be configurable (ssh sh -c ...)

Reported by: niko Assigned to: jamis
Priority: low Milestone: 1.x
Component: Capistrano Version: edge
Severity: minor Keywords: capistrano, remote shell, ssh
Cc:

Description

Capistrano 2 always uses "ssh sh -c ..." to execute remote commands. This changed (from Capistrano 1) to make deployment to server with non-POSIX shells (tcsh) easier.

Some paranoid shared hosts don't allow ssh users to spawn new shells. This behaviour can be reproduced if "ssh ls" works, but "ssh sh -c ls" fails.

Capistranos behaviour should be configurable to use not spawn new shells on the remote server.

First detection of this issue: http://groups.google.com/group/capistrano/browse_thread/thread/9c0bc353d7f9853f

Change History

08/21/07 08:25:48 changed by niko

  • priority changed from normal to low.
  • type changed from defect to enhancement.

This can easily be worked around by redefining "run" within deploy.rb:

def run(command)
  system %Q(ssh #{user}@#{domain} -p #{ssh_options[:port]} #{command})
end

Therefor I changed the type to enhancement and the priority to low.

09/01/07 03:33:31 changed by minam

  • status changed from new to closed.
  • resolution set to fixed.

Fixed in [7388]. Just pass :shell => false to the run command, or to set it globally for all invocations, use default_run_options[:shell] = false.