Skip to content
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

Fix issue #1314: drush core-requirements does not output descriptions in render arrays #2582

Merged
merged 2 commits into from
Feb 10, 2017

Conversation

AdamPS
Copy link
Contributor

@AdamPS AdamPS commented Feb 1, 2017

Please review new PR following the resolution suggested by @greg-1-anderson in #1315 (comment)

FYI I couldn't find anyway to override @default-fields so had to temporarily edit the code. The file http://api.drush.org/api/drush/commands%21core%21outputformat%21topics%21table.html/master suggests a --fields option but that gave me Unknown option: --fields.

I would be interested in backport to 8.x and have done and tested code changes for that too.

@weitzman
Copy link
Member

How do I see the bug with just core D8 and core Drush?

@AdamPS
Copy link
Contributor Author

AdamPS commented Feb 10, 2017

Thanks for taking time to look at this PR. The easiest way I can see to reproduce in D8 core is to trigger the check for "file %file is not protected from modifications and poses a security risk" with multiple files.

sudo chown root:root sites/default/settings.php sites/default/settings.local.php
sudo chmod 666 sites/default/settings.php sites/default/settings.local.php
drush rq --severity=2

Output from latest drush phar 8.1.9

 Title                Severity  Description
 Configuration files  Error     Not protected
                                Array

Output with drush patch applied (the PR is for master but I also have a D8 patch I could share)

 Title           Severity  Description
 Configuration   Error     Not protected
 files                      * The file /sites/default/settings.php/ is not protected from modifications
                              and poses a security risk. You must change the file's permissions to be
                              non-writable.
                            * The file /sites/default/settings.local.php/ is not protected from
                              modifications and poses a security risk. You must change the file's
                              permissions to be non-writable.

@weitzman
Copy link
Member

Removed a little unneeded code and merged. Thanks @AdamPS.

I considered showing the description field by default but it wraps terribly with the line breaks so I kept it hidden, just like this PR.

@weitzman weitzman closed this Feb 10, 2017
@weitzman
Copy link
Member

Feel free to open a new issue for 8.x back port.

@weitzman weitzman reopened this Feb 10, 2017
@weitzman weitzman merged commit 444cf70 into drush-ops:master Feb 10, 2017
@AdamPS AdamPS deleted the rq-render-array branch February 10, 2017 16:26
@AdamPS
Copy link
Contributor Author

AdamPS commented Feb 10, 2017

Thanks @weitzman. Agree that description is best hidden by default. I would be interested to understand what option to pass to override the default and show the description.

8.x backport PR coming up.

@weitzman
Copy link
Member

Pass --fields option to control what fields are shown. Works for many commands.

@AdamPS
Copy link
Contributor Author

AdamPS commented Feb 13, 2017

@weitzman Thanks, but it was drush 9/master that I was struggling with how to control the fields. Perhaps that's because it's a work in progress.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants