karfau/runex

Stop parsing options after passing runnable in list of arguments

karfau opened this issue · 0 comments

Due to the underlying argument option parser ( the following invocation:
runex -r ts-node/register runnable -r whatever
will not receive the arguments `'-r', 'whatever', and will instead be called with zero arguments (tj/commander.js#1127)
A failing test has already been added to https://github.com/karfau/runex/compare/fix/stop-at-first-positional?expand=1

The workaround for now is to add -- before runnable:
runex -r ts-node/register -- runnable -r whatever

I made an attempt to fix it by moving to yargs-parser but it has other issues.

Currently I'm evaluating the aailable options/arguments for picking the right parser: https://github.com/karfau/node-cli-arguments-options