2

I'm using Acquia's DevDesktop on Windows 10. For a shell, I'm using babun's zsh. Acquia provides the drush command line interface to Drupal.

The command itself seems okay:

{ drush }  » pwd                                                                                /cygdrive/c/Program Files (x86)/DevDesktop/tools/vendor/drush/drush 
{ drush }  » ./drush                                                                            /cygdrive/c/Program Files (x86)/DevDesktop/tools/vendor/drush/drush 
Execute a drush command. Run `drush help [command]` to view command-specific help.  Run `drush topic` to read even more documentation.
...

I created a symlink for it, but it doesn't work:

{ drush }  »  ls -lha /home/username/bin/drush                                                    /cygdrive/c/Program Files (x86)/DevDesktop/tools/vendor/drush/drush
lrwxrwxrwx 1 username None 73 Aug  1 23:29 /home/username/bin/drush -> '/cygdrive/c/Program Files (x86)/DevDesktop/tools/vendor/drush/drush/drush'

{ drush }  » cd ~                                                                                 /cygdrive/c/Program Files (x86)/DevDesktop/tools/vendor/drush/drush
{ ~ } master »                                                                                                                                              
{ ~ } master » drush                                                                                                                                               
Could not open input file: /home/username/bin/drush

I tried changing the permissions, and ensuring line endings are correct, as per this answer, but it still doesn't work.

{ ~ } master » chmod 775 /home/username/bin/drush   
{ ~ } master » dos2unix -F /home/username/bin/drush                                                                                                               
dos2unix: converting file /home/username/bin/drush to Unix format...
{ ~ } master » drush                                                                                                                                               
Could not open input file: /home/username/bin/drush

What am I doing wrong?

user10089632
  • 4,324
  • 1
  • 19
  • 33
user151841
  • 15,348
  • 28
  • 93
  • 156
  • I'm curious as to why you just don't use the Drush Console provided by DevDesktop? In my experience, creating symlinks in WIndows is a pain in the butt. You might try in stalling [mlink](https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/mklink). – deronimo Oct 19 '18 at 16:07

1 Answers1

0

My experience is, php command line interpreter is just unable to find scripts below symlinks, even when the linux/windows bash path fits and you can easily 'cd' to it, since it automatically internal does symlink translation, and when you do that, the relative reference to it from the symlinks original location does not exist anymore (meaning relatively from that "real location" of the symlink origin).

FantomX1
  • 1,023
  • 1
  • 10
  • 18