donejs / donejs/cli

The CLI should warn if passed invalid arguments

Open
#96 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
6
Forks
7
PR merge metrics
No merged PRs in 30d

Description

@imaustink commented on [Mon Sep 18 2017](https://github.com/donejs/donejs/issues/1021)

__How often can you reproduce it?__

- [x] Always
- [ ] Sometimes
- [ ] Rarely
- [ ] Unable
- [ ] I didn’t try

__Description:__
Running invalid commands exits without any warning. In my opion, this should at least output help.

__Steps to reproduce:__
Run `donejs app add some-app`.

![donejs-cli-no-error](https://user-images.githubusercontent.com/6282922/30550905-b2ece868-9c4d-11e7-9af7-febaa8db6bc7.gif)

__Expected results:__
The CLI logs a warning or help.

__Actual results:__
The CLI exits silently.

__Environment:__

| Software | Version
| ------------------ | -------
| donejs -V | `1.0.1`
| node -v | `8.4.0`
| npm -v | `5.3.0`
| Operating system | `Mac OS 10.12.6`

---

@matthewp commented on [Thu Jan 18 2018](https://github.com/donejs/donejs/issues/1021#issuecomment-358727426)

Hey @imaustink, sorry for taking so long to reply. So, what donejs actually does it defer to donejs-cli. donejs-cli will look in `node_modules/.bin/` and then package.json's `.scripts`, for, in this case `app`. So the fact that it doesn't warn when it finds something is something we can (hopefully) fix in donejs-cli. Going to move this issue there.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.