When inexisting `--track`/`--exercise` options are provided, CLI does not error

Open
#885 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
38/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Stale
Tech stack
go
Domain
cli

Research direction

Use the entry point exercism download --track=erlang --exercise=hello to reproduce the behavior and inspect the download command's validation path. Done means nonexistent track/exercise combinations produce an error instead of reporting success or creating empty metadata.

Written by the indexing model from the issue text.

Description

Current behaviour

When one provides an inexisting combination of track and exercise switches on the terminal, then the CLI will report successful download to $(exercism workspace)/users:

$ exercism download --track=erlang --exercise=hello

Downloaded to
/home/nmelzer/exercism/users

After the download there will be a .exercism folder with a metadata.json in it. It has the following contents:

{"track":"","exercise":"","id":"","url":"","handle":"","is_requester":false,"auto_approve":false}

Expected behaviour

The CLI should tell us with an error message that the track/exercise does not exist.

Dominant language
Go
Stars
1.4k
Forks
363
Avg merge
6d 13h
Merged PRs (30d)
2

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from exercism/cli

All issues in exercism/cli

Similar issues

More Go issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.