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
Drush role:create is broken #5117
Comments
I can confirm this behavior in a fresh install. It's only if I add two parameters the first time the command is run, that the role gets created as expected:
A side note: When supplying two parameters, the user role is created, but the machine name has spaces in it, i.e. Perhaps something to look at in another issue, only allowing System Configuration
|
Looks like this started happening in drupal 9.3 with https://www.drupal.org/node/3232673. I think drush should just require both arguments. I'll make a PR soon. |
I was able to keep the feature where you only provide a machine name. Its now undocumented and deprecated. Please pass both params going forward. See #5118 Drush doesn't try to improve your provided machine name. I think thats reasonable. |
Thanks, I tested the update, and it works well. |
That was fast, thank you! |
Thank you for reporting it :) |
The bug / steps to reproduce
When I ran
$ drush role:create 'some role'
I got:And then a bunch of debugging info (stack trace).
After this, I could not see the new role in the admin UI. But when trying the command again (this time with two arguments, as should also work), it said:
Expected behavior
The new role is created and available in the admin UI.
Actual behavior
See above.
Workaround
Create the role from the admin UI.
System Configuration
Additional information
This happened to me when following the instructions at https://next-drupal.org/learn/quick-start. A couple of contrib modules and two patched had already been installed at this point, but I don't think that is causing the problem.
The text was updated successfully, but these errors were encountered: