Drush newbie, installed on shared host following these instructions. Drush isn't recognizing that there's a Drupal installation unless I use the -r option. I noticed a problem with this command (I've removed a lot of [I think] irrelevant lines):

x@example.com [~/public_html/d7]# drush -d dl omega
...
Executing: tar -tzf omega-7.x-4.0-beta6.tar.gz
  omega/
...
Calling chdir(/home/x/public_html/d7) [1.14 sec, 8.36 MB]                                                          [debug]
Verifying signature for svn version control engine. [1.14 sec, 8.38 MB]                                            [debug]
Executing: svn info /home/x/public_html/d7
  svn: '/home/x/public_html/d7' is not a working copy
Verifying signature for bzr version control engine. [1.16 sec, 8.24 MB]                                            [debug]
Executing: bzr root /home/x/public_html/d7
  sh: bzr: command not found
Calling _drush_recursive_copy(/tmp/drush_tmp_1373908816_51e42f5010061/omega, /home/x/public_html/d7/omega)         [debug]
[1.16 sec, 8.24 MB]
Project omega (7.x-4.0-beta6) downloaded to /home/x/public_html/d7/omega. [1.26 sec, 8.24 MB]                    [success]

Instead of downloading to sites/all/themes -- or, if I'm in a site directory, to sites/{site name} -- the theme is being downloaded to the current directory. drush status shows that the current directory isn't recognized as a Drupal install:

x@example.com [~/public_html/d7]# drush -d status
Bootstrap to phase 0. [0 sec, 3 MB]                                  [bootstrap]
Drush bootstrap phase : _drush_bootstrap_drush() [0.01 sec, 3.21 MB] [bootstrap]
Loading drushrc "/home/x/drush/drushrc.php" into "drush" scope. [0.01 sec, 3.22 MB]                            [bootstrap]
Cache HIT cid: 5.9-commandfiles-0-3630d8f2cff16b9d099fd2d16431206f [0.01 sec, 3.23 MB]                             [debug]
Bootstrap to phase 0. [0.07 sec, 7.64 MB]                                                                      [bootstrap]
Found command: core-status (commandfile=core) [0.08 sec, 7.69 MB]                                              [bootstrap]
 PHP configuration     :  /usr/local/lib/php.ini                            
 Drush version         :  5.9                                               
 Drush configuration   :  /home/x/drush/drushrc.php                     
 Drush alias files     :  /home/x/drush/includes/../aliases.drushrc.php 

Command dispatch complete [0.1 sec, 7.8 MB]                                                                       [notice]
Peak memory usage was 9.05 MB [0.1 sec, 7.8 MB]                                                                   [memory]

x@example.com [~/public_html/d7]# drush -r /home/x/public_html/d7 status
 Drupal version         :  7.22                                              
 Site URI               :  http://default                                    
 Default theme          :  garland                                           
 Administration theme   :  garland                                           
 PHP configuration      :  /usr/local/lib/php.ini                            
 Drush version          :  5.9                                               
 Drush configuration    :  /home/x/drush/drushrc.php                     
 Drush alias files      :  /home/x/drush/includes/../aliases.drushrc.php 
 Drupal root            :  /home/x/public_html/d7                        
 Site path              :  sites/default                                     
 File directory path    :  sites/default/files

I've made this a little easier by adding an @all alias, but I wonder what I'm missing that would make Drush recognize the directory that I'm in as a valid install?

Comments

mrtoner’s picture

Component: Miscellaneous » Base system (internal API)
Category: support » bug

Fixed on my end. It appears that Drush can specify an incorrect base directory when it creates drushrc.php.

greg.1.anderson’s picture

Category: bug » support
Status: Active » Fixed

Adjusting status.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.