-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Possible to specify executable for subcommands? #826
Comments
Can I submit a PR for this? What would be a logical way to add this functionality to the API? |
Hi, I created #830 to provide a fix for this problem. It does the common sense thing of checking what the symlink in bin resolved to, and checking for that, if it would otherwise fail to find the subcommand's script. |
I dont know if it helps, but i always define executable as relative path and it always works, ie.
|
Pull Request #999 is being considered for v3, adds option to override executable file name |
This issue will be resolved when v3.0.0 is released. Available now as a prerelease. See #1001 |
|
I have a set of subcommands, structured like this:
And in my package.json, I have
"bin": { "mytool": "bin/cli.js" }
. When I run subcommands locally, usingnode bin/cli.js
, all is fine. But when I install my project globally and try to runmytool search
from the command line, it doesn't work, because it's looking formytool-search.js
.Is it possible to override the default behavior of using
argv[1]
? I want to avoid having to rename everything tomytool-search.js
, etc...The text was updated successfully, but these errors were encountered: