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

Improve error message if using "/help --" #11796

Merged
merged 1 commit into from
Dec 1, 2021

Conversation

Wuzzy2
Copy link
Contributor

@Wuzzy2 Wuzzy2 commented Nov 30, 2021

This small PR is a minor usability change. It improves the error message when the player enters an invalid help command like this:

/help --

The error occurs if -- appears at the beginning of a word. It might happen if the player accidentally mistypes the -t parameter as --t. This is due to the implementation of getopts.

Previously, this returned a cryptic error message “Flags beginning with -- are reserved” to the player. This is very confusing, so I replaced it with “Invalid usage (see /help help).”.

@sfan5 sfan5 added @ Builtin Bugfix 🐛 PRs that fix a bug Trivial The change is a trivial bug fix, documentation or maintenance change, as per the Git Guidelines labels Dec 1, 2021
@SmallJoker SmallJoker merged commit 80c3c7e into minetest:master Dec 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bugfix 🐛 PRs that fix a bug @ Builtin One approval ✅ ◻️ Trivial The change is a trivial bug fix, documentation or maintenance change, as per the Git Guidelines
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants