You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
though in this case positional arguments are not supported so I can't mix <host> with option flags but at least I can extract it as first element of args._
The text was updated successfully, but these errors were encountered:
Deep in the code... At the point the error is being thrown, the arguments are in arg.-- instead of argv._. I can see code "counting" the positionals with and without taking -- into account. I suspect need the first case to include -- length like in the second case.
I'm trying to write a CLI similar to
ssh
. Here's the minimal example:which just adds one option. When parsing
node my-script.js my-host ls
, I get this error:The only way I manage to get this work is with default command syntax:
though in this case positional arguments are not supported so I can't mix
<host>
with option flags but at least I can extract it as first element ofargs._
The text was updated successfully, but these errors were encountered: