Improve error message for when multitask target doesn't exist
- Dominant language
- JavaScript
- Stars
- 12.2k
- Forks
- 1.5k
- PR merge metrics
- No merged PRs in 30d
Description
Let's say we have a multitask named `deploy`:
```
deploy: {
dev: { /* settings */ },
snapshot: { /* settings */}
},
```
If you mistype the target name, you'll get the following error:
```
$ grunt deploy:prod
Running "deploy:prod" (deploy) task
Verifying property deploy.prod exists in config...ERROR
>> Unable to process task.
Warning: Required config property "deploy.prod" missing. Use --force to continue.
Aborted due to warnings.
```
It would be nicer if the error message looked something like:
```
$ grunt deploy:prod
Running "deploy:prod" (deploy) task
Verifying property deploy.prod exists in config...ERROR
>> "deploy:prod" task target does not exist
Available targets are: "dev", "snapshot".
Aborted due to warnings.
```
It would be even more awesome if it had git-style fuzzy command matching:
```
$ grunt deploy:dve
Running "deploy:dve" (deploy) task
Verifying property deploy.prod exists in config...ERROR
>> "deploy:dve" task target does not exist
Did you mean "deploy:dev"? (Available targets are: "dev", "snapshot").
Aborted due to warnings.
```
Contributor guide
Assessment
This issue has not been assessed yet.