-
-
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
Root relative paths in site aliases #2411
Comments
Are you using latest dev on both sides of the rsync? Please post both |
Lools like the root cause is in drush_sitealias_evaluate_path(). If i set %files explicitly to 'foo', the path is "corrent/docroot/current/docroot/foo". |
[renner@serpens docroot]$ drush @weinkauf.live-new.default version [renner@serpens docroot]$ drush @weinkauf.live.default version |
|
Debugging shows this is the code in drush_sitealias_evaluate_path() that does the duplication. Alas, i'm too far from groking the logic there to suggest a fix. (Also it looks like it needs a conceptual decision where to do the job)
EDIT: updated code. |
This has come up in a few issues. Maybe @greg-1-anderson can spot the problem and know where to fix. Also see #2324 |
Drush does not support relative paths for I also think that the workaround is a bad idea, but it would work as well as could be expected (which IMO is not very well). |
Should we throw an exception or error when we read such a malformed root?
|
I think that failing fast might be appropriate here; however, the guard would have to be well-placed. --root on the command line might be relative, and that should be allowed. It might be overly diligent to stop execution for any alias merely loaded that contains a relative document root; besides, some might choose to store their alias roots as relative paths, and then use an alias alter hook to provide the base path. So, if such a check is included, it would have to be right before the alias was used, after it was altered. I'm not convinced it's worth the effort to do it at this point. Maybe the object-oriented implementation of aliases could have a |
I'd request keeping this behavior as it can strongly simplify aliases. (I have providers here that have no less than 7 path components in a user-root =:-() And the server knows its user-root so why duplicate that.) |
You'd be better off changing your aliases to use I'm not in a big hurry to break this feature, though. |
Old issue; closing. |
When using a home-relative (important here) root path, the path is duplicated. Experienced on 8.1.6 and today's dev.
See "current/docroot/current/docroot" below.
The text was updated successfully, but these errors were encountered: