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

Fix misleading usage examples for config:set and config:delete commands #4085

Merged
merged 2 commits into from
Jun 1, 2019
Merged

Fix misleading usage examples for config:set and config:delete commands #4085

merged 2 commits into from
Jun 1, 2019

Conversation

BaluErtl
Copy link
Contributor

I fell into that mistake that naively believed the syntax the usage hint suggested and ran this command like this:
$ drush config:set system.site page.403 filter/tips
When tested the results in browser, I got the regular exception from Drupal core:

The website encountered an unexpected error. Please try again later.
InvalidArgumentException: The user-entered string 'filter/tips' must begin with a '/', '?', or '#'. in Drupal\Core\Url::fromUserInput() (line 204 of core/lib/Drupal/Core/Url.php).

Although Drupal's GUI still lacks of consistency on how to properly request users to type in internal URL paths (with or without leading slashes), at least on the CLI side Drush could do better. Let's help future fellows not to fall again into this pitfall I learned today. Once they took the time to check --help before running the actual command, that examples should really help them, not misleading.

@weitzman weitzman merged commit 4f53cbc into drush-ops:master Jun 1, 2019
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.

2 participants