-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Drush site alias commands stop working with version 12 #5761
Comments
Does this command work, if you run it manually?
If not, what is the path to the site-local Drush in your remote Drupal site? |
That command will not work because drush is not located at that path, it is located in the In troubleshooting this after opening this ticket, I did determine that if the path to the drush-script is explicitely specified in the site alias file (which means that we are bypassing the drush launcher script (which we do have installed), the site aliases work again. Guess this means that |
It is true that Drush 12 also adds the requirement that the remote Drush be a site-local Drush. It should assume that Drush is located in You didn't show |
I think this can be closed, since adding the specific path to the local drush install for each environment defined in the self.site.yml file rectified the problem. But, now this is documented for anyone else that encounters this issue. Thanks @greg-1-anderson ! |
What did you change to fix it? Is your site local Drush located at |
The site local drush is in "vendor/bin", I added the following to the drush aliases:
|
Yes, that workaround will be necessary if your site has the project root at the docroot. It is recommended to put vendor outside of the docroot, e.g. with Drush located at '/home/forge/<my.website.com>/vendor/bin/drush' |
I'm running into this drush script being incorrect too:
The
@greg-1-anderson Do you happen to know where/how that path is derived? I'll dig a bit |
What that translates to for me:
When this runs to join the root and relative path: That It's still the wrong directory. Am I doing something wrong in my interpretation of what |
… description says not the drush base path
…ion says not the drush base path (#5785)
Luckily
The example is not clear what |
Describe the bug
Drush site alias commands that worked with Drush 11 are now not working with Drush 12.
To Reproduce
Upgraded drush install to Drush 12
Expected behavior
Executing drush @self.live status would return a status listing for the site defined for the alias @self.live
Actual behavior
Command returned an exit code 127 (command not found)
Workaround
Is there another way to do the desired action?
System Configuration
We have drush-installer installed in the global path on the remote server.
Additional information
Running command with Drush 11 installed passing verbose flags reveals that the shell command executed by Drush is:
ssh -t -o PasswordAuthentication=no <username>@<ip_address> 'drush status -vvv --uri=https://my.website.com --root=/home/forge/my.website.com/public
<== executes drush successfully on remote serverRunning command with Drush 12 installed passing verbose flags reveals that shell command executed by Drush is:
ssh -t -o PasswordAuthentication=no <username>@<ip_address> '/home/forge/bin/drush status -vvv --uri=https://my.website.com
<== fails to execute on remote serverThe site alias file did not change, only the version of drush installed.
Drush alias file (
./drush/sites/self.site.yml
):Two observations:
--root=/home/forge/my.website.com/public
is not being passed into the drush command--root
not being passed)The text was updated successfully, but these errors were encountered: