tsd icon indicating copy to clipboard operation
tsd copied to clipboard

`tsd install` fails without an error if `--save` comes before the definition name

Open whatisaphone opened this issue 8 years ago • 7 comments

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.

whatisaphone avatar Aug 03 '15 20:08 whatisaphone

+1

alexewerlof avatar Aug 31 '15 09:08 alexewerlof

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).

kengorab avatar Oct 08 '15 03:10 kengorab

+1

yangmillstheory avatar Dec 27 '15 00:12 yangmillstheory

+1

haimich avatar Jan 13 '16 18:01 haimich

+1 This bug wasted an hour of my time. Multiply by.. how many developers? Minor bug, but a large global impact

GregWoods avatar Jan 21 '16 13:01 GregWoods

Cost me about 15 minutes figuring out why lodash wouldn't install.

jschaf avatar Feb 27 '16 19:02 jschaf

+1

jon-prg avatar Sep 20 '16 17:09 jon-prg