jsr-io / jsr-npm

A cli tool to make installing packages form jsr.io in node easy
https://npmjs.com/package/jsr
MIT License
88 stars 12 forks source link

`npx jsr <subcommand>` exits with `0` for unknown commands #79

Closed nicolo-ribaudo closed 2 months ago

nicolo-ribaudo commented 2 months ago

I tried running npx jsr init to see if it did something. init is not supported (so it did nothing), but it exists with 0 rather than a non-0 exit code.

marvinhagemeister commented 2 months ago

I'm getting an exit code 1 on macOS with zsh:

$ npx jsr init
Unknown command: init
# ...snip

$ echo $?
1
nicolo-ribaudo commented 2 months ago

I just tried again and I now also get 1 with an error:

image

Luckily I still have my terminal opened for yesterday, and I can guarantee that the command was not failing :sweat_smile:

image

It was the first time I was using npx jsr, so it just installed jsr@0.12.2 yesterday.

nicolo-ribaudo commented 2 months ago

Oh I can reproduce it again, it happens if you do not already have a package.json file.

marvinhagemeister commented 2 months ago

Yup that's it. Can confirm this bug.