Created directory at /www/d6test.com/html
Ran drush dl drupal --destination /www/d6test.com/html/
Got this error:

[root@ewhserver393 www]# drush dl drupal --destination /www/d6test.com/html/
PHP Warning:  chdir(): No such file or directory (errno 2) in /var/www/html/drus
h/includes/drush.inc on line 127

Warning: chdir(): No such file or directory (errno 2) in /var/www/html/drush/inc
ludes/drush.inc on line 127
Unable to download drupal-6.10.tar.gz to 1 from                          [error]
http://ftp.drupal.org/files/projects/drupal-6.10.tar.gz

I then cd'ed into that directory and ran drush dl drupal without the destination option and it worked, but it put Drupal into a subdirectory (drupal-6.10) which I don't want. How do I make it put Drupal directly in the html directory?

Comments

seanr’s picture

BTW /www/ is an alias to /var/www/html/. I also tried it using the actual path instead of the alias and it still failed.

owen barton’s picture

Status: Active » Fixed

I have added better handling and error checking for the --destination parameter - can you please check 2.x HEAD and reopen if this is still an issue?

Status: Fixed » Closed (fixed)

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

seanr’s picture

Status: Closed (fixed) » Active

I now get this:

[user@server aegir.com]$ drush dl drupal --destination /www/aegir.com/html/
The destination directory 1/ does not appear to exist.
                                                [error]
seanr’s picture

That is a known valid directory, BTW, I had just created it.

seanr’s picture

OK, actually this is a documentation issue. This is how the command should be (tried it on a whim and it worked):

drush dl drupal --destination=/www/aegir.com/html/

However, it then installed Drupal into a subfolder of html called drupal-6.10. I wanted it directly in html, not a subdirectory.

moshe weitzman’s picture

Status: Active » Postponed (maintainer needs more info)

we always keep the folder. please move files using mv if needed.

feel free to reopen this better docs. long options need the = and short options do not. thats a shell convention AFAIK.

moshe weitzman’s picture

Title: drush dl drupal --destination [path] fails with Warning: chdir(): No such file or directory (errno 2) » destination error
Status: Postponed (maintainer needs more info) » Closed (fixed)