tsd
tsd copied to clipboard
`tsd install` fails without an error if `--save` comes before the definition name
Command I ran:
$ tsd install --save lodash
Actual output:
-> running install
>> written zero files
Expected output:
- lodash / lodash
>> running install..
>> written 1 file:
- lodash/lodash.d.ts
Command I should have run:
$ tsd install lodash --save
tsd
was acting like I passed no options at all. It had me wondering what was wrong with my system for a bit and looking around for cache files to delete. I've never seen a command-line tool be picky about the order of the options like this (besides find
:smile:). Seems like surprising behavior to me.
+1
I've got a pull request here that fixes this, and also other flag options, which were not being handled correctly. After my changes, tsd install --save lodash
and tsd install lodash --save
should yield the same result, and so should tsd query d3 --info
and tsd query --info d3
(previously, this would throw an error claiming no query pattern was specified).
+1
+1
+1 This bug wasted an hour of my time. Multiply by.. how many developers? Minor bug, but a large global impact
Cost me about 15 minutes figuring out why lodash wouldn't install.
+1