Error when providing an unknown option #1339
Closed
roberthoglund
started this conversation in
General
Replies: 2 comments
-
You forgot one point in your enumeration of cases: When your Command Executes, it gets a reference to a So, for your case if |
Beta Was this translation helpful? Give feedback.
0 replies
-
Perfect, that's just what I need. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
First I would like to apologise if what I'm asking for is in the documentation but if so, I couldn't conjure up the correct search phrase.
I would like to abort a command if it receives an option it doesn't recognise. My use case is that I have an option named --dry-run for many commands, which if supplied the command doesn't do any updates. It's a safety thing so if I were to misspell it, e.g. --dyr-run, the command would run and do the update while I'm assuming it won't.
I'm hoping either of these suggestions are possible.
Beta Was this translation helpful? Give feedback.
All reactions