drush
drush copied to clipboard
Make `config:status` and `config:import` show export directory
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
- Show the export directory when running
config:statusandconfig:export, same asconfig:import. - Maybe show as
Export directory: ../assets/configat 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
See drush st --format=yaml. We should probably add the config-sync field to the default output of that command.
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?