Skip to content
This repository has been archived by the owner on Apr 30, 2019. It is now read-only.

tsd command line treats the first switch as definition name #263

Open
amphineko opened this issue Jan 17, 2016 · 2 comments
Open

tsd command line treats the first switch as definition name #263

amphineko opened this issue Jan 17, 2016 · 2 comments

Comments

@amphineko
Copy link

I'm trying to install definitions in my usual way on npm, like "npm install --save something".

amphineko@amphineko-xwbp: ~/workspace/Rice % tsd install --save yargs

-> running install

>> written zero files
amphineko@amphineko-xwbp: ~/workspace/Rice % tsd install yargs --save

 - yargs / yargs

>> running install..

>> written 1 file:

    - yargs/yargs.d.ts

I tried the first one and got failed for many times, this kind of ordering arguments always confuses me.
It would be better if tsd install could tell me --save is unable to install, so I can figure out that I have made a mistake on arguments-ordering.

@amphineko amphineko changed the title "install --save something" thinks "--save" is the definition to install tsd command line deals the first switch as definition name Jan 17, 2016
@amphineko amphineko changed the title tsd command line deals the first switch as definition name tsd command line treats the first switch as definition name Jan 17, 2016
@mattmazzola
Copy link

Yea, this bug has confused me too. I think the position of the command line options should not matter. npm and bower behave this way so if developers grow habit of putting --save first they will have trouble using tsd. As amphineko said this is also misleading because the user thinks the package doesn't exist when it was actually interpreting the command differently.

@felipesabino
Copy link

Duplicated of #196

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants