bchr02 / node-pre-gyp-github

A node-pre-gyp module which provides the ability to publish to GitHub releases.
MIT License
52 stars 32 forks source link

Fix options infocation #46

Closed SemiConscious closed 4 months ago

SemiConscious commented 4 months ago

Hi There.

Thanks for this incredibly useful action! But I believe I found a flaw: I was unable to get the --release switch to work.

After checking the commander documentation and after experimenting in practice, it seems that the --release and --silent options are effectively ignored, due to the signature of the commander action handler being incorrect. I have removed the first cmd parameter, which I think should only be there if there was an actual argument expected. With no argument, the first parameter in the action handler should be options. This fixes the observed issue of not being able to create non-draft releases.

I have had a look at your tests and I can't see any that would fail due to --release or --silent not being handled, so I think this may have been an issue for a while.

Hope this helps.

SemiConscious commented 4 months ago

Here's an example run, with the change, and with some additional debug I added:

image

SemiConscious commented 4 months ago

Thanks for your prompt attention! 🥇

bchr02 commented 4 months ago

Thank you for fixing this issue. On May 12, 2024, at 3:30 PM, SemiConscious @.***> wrote: Thanks for your prompt attention! 🥇

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you modified the open/close state.Message ID: @.***>