-
Notifications
You must be signed in to change notification settings - Fork 940
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
Add web/drush.wrapper scaffold file for restricting commands/aliases/config to local repo. #98
Conversation
ping @greg-1-anderson for review. |
I've started to use this feature, and think it still needs a little smoothing out, per drush-ops/drush#2023. Some easy option to add on the commandline to negate the use of the drush wrapper (opposite effect as --local) would also be good. That said, there will be a drush.wrapper equivalent to this one in the Pantheon version of this project. |
drush-ops/drush#2023 is still open. I think we should adopt the script without the |
I'm fine with committing this without --local. I wrote above about the value of this option. I will say that clients who really want to bring in drush commands/config from outside the project can still use drush's --config and --alias-path. |
I removed --local. I think this is ready. webflo proposed something similar in #202 (either script would be fine with me). |
Actually, this should go into project root not /web. Lets close this in favor of #202 (or ask people to use drupal-shim project). |
@weitzman Just curious : what is the "drupal-shim project" ? |
Sorry, I mistyped. Here it is: drush-shim |
Ah, right :-)
…On Mon, Dec 19, 2016 at 8:10 PM, Moshe Weitzman ***@***.***> wrote:
Sorry, I mistyped. Here it is: drush-shim
<https://github.com/webflo/drush-shim>
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#98 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AALyONty2gX2Jz5OdII0gUAoG7snz6drks5rJtahgaJpZM4HBnpv>
.
|
Drush has support for a drush.wrapper in Drupal root which customizes how Drush gets called. The wrapper I propose here adds --local to all Drush requests. This tells Drush not to scan for config, site aliases, and commandfiles in global locations (e.g. ~/.drush, /etc/drush, ...). This environment isolation is very helpful - all Drush requests run the same no matter who's system you are on. Furthermore, it emphasizes that Drush files go in this repo's /drush dir, not in legacy places like ~/.drush. In the rare cases when globally installed commands are needed and can't be copied to our /drush for some reason, user can add --no-local to her request (or in the extreme permanently remove --local from this file).
In order to test this PR, make sure you have some commandfiles, config, or aliases installed to ~/.drush. Then run a
drush sa --root=/path/to/web
. Notice how your global commands/aliases/config are no longer in effect with this PR.