drush icon indicating copy to clipboard operation
drush copied to clipboard

Make `config:status` and `config:import` show export directory

Open gitressa opened this issue 1 year ago • 2 comments

Problem

Sometimes, you like to check where the export directory is with Drush, and maybe you run config:status, but get no help:

$ drush config:status
 [notice] No differences between DB and sync directory.

... also not from config:import:

$ drush config:import --diff
 [notice] There are no changes to import.

You do get to see the export directory with config:export:

$ drush config:export --diff
 [notice] The active configuration is identical to the configuration in the export directory (../assets/config).
../assets/config

Proposed solution

  1. Show the export directory when running config:status and config:export, same as config:import.
  2. Maybe show as Export directory: ../assets/config at the bottom, if possible? And remove the path in the parentheses after the " [notice] The active ..." string.
$ drush config:status --diff
 [notice] The active configuration is identical to the configuration in the export directory.
 Export directory: ../assets/config
Difference
$ drush config:status
 ------------- ----------- 
  Name          State      
 ------------- ----------- 
  system.site   Different  
 ------------- ----------- 
 Export directory: ../assets/config

gitressa avatar Nov 20 '24 21:11 gitressa

See drush st --format=yaml. We should probably add the config-sync field to the default output of that command.

weitzman avatar Nov 20 '24 21:11 weitzman

Thanks, that works well. Adding config-sync: ../assets/config to drush st would be very nice.

But maybe also include with drush config:status at the end, as seen in the last example above?

gitressa avatar Nov 20 '24 22:11 gitressa