Download & Extend

Provide warning message when project name not provided for drush info

Project:Drush
Version:All-versions-5.x-dev
Component:PM (dl, en, up ...)
Category:feature request
Priority:normal
Assigned:Unassigned
Status:closed (fixed)

Issue Summary

running an OpenVZ VPS: Debian lenny

drush info

No information available.                                                                           [error]
An error occurred at function : drush_pm_info                                                       [error]

drush info -v

Initialized Drupal 6.13 root directory at /my/directory/drupal                                        [notice]
Initialized Drupal site default at sites/default                                                       [notice]
Including version specific file : /mydirectory/aegir/drush/commands/pm/update_info/drupal_6.inc                [notice]
No information available.                                                                           [error]
An error occurred at function : drush_pm_info                                                       [error]
Command dispatch complete                                                                              [notice]

drush info -d

Drush bootstrap phase : _drush_bootstrap_drupal_root() [0.015 sec]                                  [bootstrap]
Loading drushrc "/mydirectory/aegir/drupal-6.x/drushrc.php" into "drupal" scope. [0.016 sec]                [bootstrap]
Initialized Drupal 6.13 root directory at /mydirectory/aegir/drupal-6.x [0.024 sec]                            [notice]
Drush bootstrap phase : _drush_bootstrap_drupal_site() [0.026 sec]                                  [bootstrap]
Initialized Drupal site default at sites/default [0.026 sec]                                           [notice]
Drush bootstrap phase : _drush_bootstrap_drupal_configuration() [0.028 sec]                         [bootstrap]
Drush bootstrap phase : _drush_bootstrap_drupal_database() [0.032 sec]                              [bootstrap]
Successfully connected to the Drupal database. [0.032 sec]                                          [bootstrap]
Drush bootstrap phase : _drush_bootstrap_drupal_full() [0.037 sec]                                  [bootstrap]
Drush bootstrap phase : _drush_bootstrap_drupal_login() [0.147 sec]                                 [bootstrap]
Found command: info [0.149 sec]                                                                     [bootstrap]
Including version specific file : /mydirectory/aegir/drush/commands/pm/update_info/drupal_6.inc [0.149 sec]    [notice]
No information available. [0.149 sec]                                                               [error]
An error occurred at function : drush_pm_info [0.149 sec]                                           [error]
Command dispatch complete [0.15 sec]                                                                   [notice]

drush enable update

Update status is already enabled.                                                                   [error]
There were no modules that could be enabled.                                                        [ok]

Comments

#1

Title:An error occurred at function : drush_pm_enable » An error occurred at function : drush_pm_info

oops, title should be: "An error occurred at function : drush_pm_info"

#2

Subscribing. What exactly should "drush info" show? A friend said that it used to show update information?

#3

Version:All-Versions-2.0» All-versions-5.x-dev
Component:Installation» Code
Status:active» needs review

The "drush info" command requires an additional parameter - project name. So just "drush info" bombs out. "drush info cck" or the like works as expected.

The attached patch adds an error message if "drush info" is called without arguments:

Too few arguments. Include a project name. Example: drush info cck [error]

AttachmentSize
drush-539704.patch 857 bytes

#4

Title:An error occurred at function : drush_pm_info » Provide error message when project name not provided for drush info
Category:bug report» feature request
Status:needs review» reviewed & tested by the community

More a feature request than a bug report. Patch looks good, works well. Sensible addition.

More cleanly-applying version of the patch in #3 attached; also removes unnecessary whitespace introduced by that patch.

AttachmentSize
drush-info.patch 887 bytes

#5

Title:Provide error message when project name not provided for drush info» Provide warning message when project name not provided for drush info

Better still, make it a warning message rather than an error message, which makes more sense and also eliminates the additional "An error occurred at function : drush_pm_info" which is otherwise appended to the proposed message.

Slightly improved the grammar of the message as well, to now read:
Too few arguments; you must include a project name. Example: drush info cck.

AttachmentSize
drush-info-2.patch 878 bytes

#6

Hmm, removed the trailing fullstop I introduced into the warning message lest someone misunderstand the example:
Too few arguments; you must include a project name. Example: drush info cck

AttachmentSize
drush-info-3.patch 877 bytes

#7

Status:reviewed & tested by the community» needs work

for dl command, a lack of project implies the drupal project. probably should do same here.

#8

Component:Code» PM (dl, en, up ...)
Status:needs work» fixed

At present the command is not "info" but pm-releases (we need to supress deprecated aliases).

It now defaults to drupal. Was added along with #843740: Add pm-releasenotes command to extract the release notes from drupal.org

#9

Status:fixed» closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

nobody click here