tsd icon indicating copy to clipboard operation
tsd copied to clipboard

tsd command line treats the first switch as definition name

Open amphineko opened this issue 9 years ago • 2 comments

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 avatar Jan 17 '16 02:01 amphineko

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.

mattmazzola avatar Jan 27 '16 00:01 mattmazzola

Duplicated of #196

felipesabino avatar Feb 21 '17 12:02 felipesabino