DefinitelyTyped / tsd

[DEPRECATED] TypeScript Definition manager for DefinitelyTyped
Apache License 2.0
1.12k stars 135 forks source link

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

Open amphineko opened 8 years ago

amphineko commented 8 years ago

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.

mattmazzola commented 8 years ago

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 commented 7 years ago

Duplicated of #196