When I run drush commands using a remote site alias, and the default shell on the remote host is tcsh, the command fails with a "file exists" error:

~$ drush @sa st --debug
Bootstrap to phase 0. [0.02 sec, 2.56 MB]                            [bootstrap]
Drush bootstrap phase : _drush_bootstrap_drush() [0.02 sec, 2.76 MB] [bootstrap]
Load alias @sa [0.02 sec, 2.77 MB]                                                                                     [notice]
Begin redispatch via backend invoke [0.06 sec, 6.71 MB]                                                                 [notice]
Running: ssh -o PasswordAuthentication=no 'user'@'machine.domain.edu' 'drush                                         [command]
--root='\''/path/to/drupal'\'' --uri='\''default'\'' --debug st --backend 2>&1'  2>&1 [0.06 sec,
6.71 MB]
Undefined offset: 1 backend.inc:163 [2.12 sec, 6.71 MB]                                                                 [notice]
Undefined variable: output backend.inc:170 [2.12 sec, 6.71 MB]                                                          [notice]
The command could not be executed successfully (returned: 1: File exists.                                            [error]
, code: 1) [2.12 sec, 6.71 MB]
Backend invoke is complete [2.13 sec, 6.71 MB]

Interestingly, remote site aliases worked with tcsh as the default shell in drush 3:

~$ drush3 @sa st --debug
Begin redispatch via backend invoke [0.04 sec, 4.7 MB]                                                                  [notice]
Running: ssh -o PasswordAuthentication=no 'user'@'machine.domain.edu' 'drush                                         [command]
--root='\''/path/to/drupal'\'' --uri='\''default'\'' --debug st --backend' [0.04 sec, 4.7 MB]
Bootstrap to phase 0. [2.2 sec, 4.76 MB]                                                                             [bootstrap]
.
.
.
Command dispatch complete [2.21 sec, 4.77 MB]                                                                           [notice]
Peak memory usage was 43.38 MB [2.21 sec, 4.77 MB]                                                                      [memory]
 Drupal version         :  6.22                                                 
 Site URI               :  default                                              
 Database driver        :  mysql                                                
 Database hostname      :  127.0.0.1                                            

etc...

Some poking around on the interwebs indicates that tcsh handles the ">" operator differently than bash.

Comments

greg.1.anderson’s picture

Version: » 8.x-6.x-dev
Status: Active » Closed (won't fix)
Issue tags: +Needs migration

This issue was marked closed (won't fix) because Drush has moved to Github.

If desired, you may copy this bug to our Github project and then post a link here to the new issue. Please also change the status of this issue to closed (duplicate).

Please ask support questions on Drupal Answers.