Improve messaging for drush commands

Created on 5 February 2023, about 2 years ago
Updated 8 February 2023, about 2 years ago

Problem/Motivation

The drush command messages are not very consistent with each other so could use some clean up.

Old problem

When running drush quant-seed-queue, some messages say Adding [x] to the list. and others say Preparing x. It would be good if this was more consistent.

Steps to reproduce

Example

  • Install Drupal 7
  • Enable and configure quant_api module
  • Use devel_generate to generate content including image files
  • Go to Seed tab (/admin/config/services/quant/seed)
  • Check: Export nodes (Article, Basic page), Export taxonomy terms, Export theme assets, Export Views, Custom routes (/node)
  • Click Save configuration button
  • From command-line, run drush quant-seed-queue
  • Result: There will be a mixture of messages depending on the type of entity
  • Expected result: Consistent messages no matter what the entity is
  • Kristens-MacBook-Pro:quantcdn kristenpol$ ddev drush quant-seed-queue
    Quant: Populating seed queue.                                                                                                                [ok]
    Running Quant operation for kristentesting: drupal7rc4                                                                                       [ok]
    Adding [2] to the list.                                                                                                                      [ok]
    Adding [3] to the list.                                                                                                                      [ok]
    Adding [1] to the list.                                                                                                                      [ok]
    Adding [4] to the list.                                                                                                                      [ok]
    Adding [5] to the list.                                                                                                                      [ok]
    Adding [5] to the list.                                                                                                                      [ok]
    Adding [2] to the list.                                                                                                                      [ok]
    Adding [4] to the list.                                                                                                                      [ok]
    Adding [3] to the list.                                                                                                                      [ok]
    Adding [1] to the list.                                                                                                                      [ok]
    Preparing /themes/bartik/images/add.png                                                                                                      [ok]
    Preparing /themes/bartik/images/buttons.png                                                                                                  [ok]
    Preparing /themes/bartik/images/search-button.png                                                                                            [ok]
    Preparing /themes/bartik/images/tabs-border.png                                                                                              [ok]
    Preparing /themes/bartik/css/colors.css                                                                                                      [ok]
    Preparing /themes/bartik/css/ie-rtl.css                                                                                                      [ok]
    Preparing /themes/bartik/css/ie.css                                                                                                          [ok]
    Preparing /themes/bartik/css/ie6.css                                                                                                         [ok]
    Preparing /themes/bartik/css/layout-rtl.css                                                                                                  [ok]
    Preparing /themes/bartik/css/layout.css                                                                                                      [ok]
    Preparing /themes/bartik/css/maintenance-page.css                                                                                            [ok]
    Preparing /themes/bartik/css/print.css                                                                                                       [ok]
    Preparing /themes/bartik/css/style-rtl.css                                                                                                   [ok]
    Preparing /themes/bartik/css/style.css                                                                                                       [ok]
    Preparing /themes/bartik/color/base.png                                                                                                      [ok]
    Preparing /themes/bartik/color/preview.css                                                                                                   [ok]
    Preparing /themes/bartik/color/preview.js                                                                                                    [ok]
    Preparing /themes/bartik/color/preview.png                                                                                                   [ok]
    Preparing /themes/bartik/logo.png                                                                                                            [ok]
    Preparing /themes/bartik/screenshot.png                                                                                                      [ok]
    

    Proposed resolution

    Update messaging to make it more consistent.

    Remaining tasks

    1. Update messaging
    2. Review and test
    3. Commit :)

    User interface changes

    The command messaging will be changed.

    API changes

    Data model changes

    πŸ“Œ Task
    Status

    Fixed

    Version

    1.0

    Component

    Documentation

    Created by

    πŸ‡ΊπŸ‡ΈUnited States Kristen Pol Santa Cruz, CA, USA

    Live updates comments and jobs are added and updated live.
    Sign in to follow issues

    Comments & Activities

    Production build 0.71.5 2024