-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Config import single command #5146
Comments
This would be so nice to have! |
Just ran into a situation where this would have been very helpful! In my case something like: Single should not mean here, that it must be just a single config, but can also be a list of config names, but ONLY these should be imported. So perhaps there's a better standard name typically used for such things? Perhaps other linux tools give an idea? sftp file transfer by file name or others? @weitzman would you prefer to use "cim" for this (I'd do) or a separate one like "cims"... Edit: what about for example: |
Thats the recommended way.
Its one |
I also landed here looking for a way to import a single file and think this should be reopened. To say that a single
It's a non trivial amount of work for something that feels like it should already be supported by the --partial flag. |
Agree with @ctrladel. The answer given by @weitzman is very assume'ish and also seems to include an uneducated opinion at the tail end stating that it's "just a cp". Assuming that it's "just a cp" is pretty ridiculous when you toss in 21st century hosting methods, git repositories (pull requests and the like), etc. Not every site is hosted on your own machine. Making multiple copies of something just to limp around lack of a required feature can be quite an involved process depending upon the hosting situation. The correct fix is to actually implement a single config import. IE: Drupal console has this in the form of config:import:single (alias of cis), drush is lagging behind in a lot of areas compared to drupal console: https://drupalconsole.com/docs/vn/commands/config-import-single |
PRs welcome for this. |
Until then config:set can replace a whole config object https://www.drush.org/latest/commands/config_set/. Satisfies some use cases. |
As far as I am aware, config:set doesnt work with files or does it? I am pretty certain config:set is just a command line only command which has nothing to do with the contents of a config yml file. Am I missing something? Maybe there is some sort of way to get it to load from file, idk. Would be welcome news to me :D Perhaps this might work? drush config:set --input-format=yaml < some_filename.yml I have no idea if that would even work or not. EDIT: Nope, that didnt work either :/ It still asks for a key argument. |
The
So the full command which works for me in Lando is:
With this structure:
|
The docs in #3343 should work in earlier versions of Drush as well as Drush 12. |
Thanks for maintaining Drush @weitzman and @greg-1-anderson, I appreciate it very much. It's an incredible tool. |
If anyone else needed a port of drupal console config:import:single in drush :
|
Just thought I'd throw a friendly note that, if you're running this with --source, you're likely going to have to specify a level down to your config folder because drush is technically executing from docroot.
|
As per https://drupal.stackexchange.com/questions/221592/import-a-single-yml-configuration-file, there is not currently a way to import a single configuration file via drush, equivalent to the config:import:single command provided by Drupal Console.
It would be good to have either a flag for the
config:import
command, or a separate command.As far as I'm aware, the other options are:
--partial
flagBoth of those are time-consuming.
The text was updated successfully, but these errors were encountered: