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

cmta and cmtc commands should report an error when an undefined option is passed in #200

Open
eloots opened this issue Jan 12, 2023 · 0 comments
Labels

Comments

@eloots
Copy link
Collaborator

eloots commented Jan 12, 2023

It appears that when an undefined option is passed to cmtc or cmta, the command is silently ignored and no error is reported.

For example, let's use the cmtc set-current-course command.

On the happy path:

$ cmtc set-current-course -h
Usage: cmtc set-current-course [options]
Sets the current course to point to a directory

Help options:
  --usage            Print usage and exit
  -h, -help, --help  Print help message and exit

Other options:
  -s, --directory file

$ cmtc set-current-course --directory ~/tmp/stu/lunatech-scala-2-to-scala3-course
Current course set to '/Users/ericloots/tmp/stu/lunatech-scala-2-to-scala3-course'

$ cmtc set-current-course -s ~/tmp/stu/lunatech-scala-2-to-scala3-course
Current course set to '/Users/ericloots/tmp/stu/lunatech-scala-2-to-scala3-course'

$

Now, when mistyping the option (long or short):

$ cmtc set-current-course --directorys ~/tmp/stu/lunatech-scala-2-to-scala3-course


$ cmtc set-current-course -d ~/tmp/stu/lunatech-scala-2-to-scala3-course


$
@eloots eloots added the bug label Jan 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant