Skip to content
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

Update role examples to use single quotes #5326

Merged
merged 2 commits into from
Nov 29, 2022
Merged

Update role examples to use single quotes #5326

merged 2 commits into from
Nov 29, 2022

Conversation

gitressa
Copy link
Contributor

Fixes: #5324.

Problem

The user:password example uses double quotes:

$ drush user:password -h
Set the password for the user account with the specified name.

Examples:
 drush user:password someuser "correct horse battery staple"

... but you cannot use double quotes to create passwords containing special character (for example f!oobar12345) but have to use single quotes:

Strings in single quotes are not expanded by bash.

Otherwise you get an error:

$ drush user:password your.user "!foobar12345"
bash: !foobar12345: event not found

From https://superuser.com/questions/133780/in-bash-how-do-i-escape-an-exclamation-mark

Solution

Use single quotes.

To stay consistent, I updated the other instances in examples to use single quotes as well. Also, I noticed that a few examples were not correct, so I updated them as well.

Fixes: #5324

Strings in single quotes are not expanded by bash, so to create a password special character such as `f!oobar12345`, you cannot use double quotes.
@weitzman
Copy link
Member

Thanks!

@gitressa
Copy link
Contributor Author

Perfect, thanks for a fast response!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

user:create and user:password don't recognize password starting with ! character
2 participants