-
Notifications
You must be signed in to change notification settings - Fork 8
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
Pass full command name to executables #136
Conversation
Use the ${$PREFIX}_COMMAND_NAME environment variable to pass the full command to the executable files when they are run. The full command would be the app name, followed optionally by the group name, and finally the command name that was configured in the manifest to execute the command. This can be used, for instance, by programs to output a meaningful usage message that refers to how the program was actually executed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please rename the command to avoid ambiguity, and handle the situations that user renamed the binary itself.
The program can be renamed after building, and the COMMAND_NAME variable should contain the actual name, rather than the built time name. Still resort to the build time name if the program name cannot be obtained.
Thanks for the review! In my second round of changes, I:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The environment variable name in .bat script is not correct, which fails the integration test
Use the ${$PREFIX}_COMMAND_NAME environment variable to pass the full command to the executable files when they are run.
The full command would be the app name, followed optionally by the group name, and finally the command name that was configured in the manifest to execute the command.
This can be used, for instance, by programs to output a meaningful usage message that refers to how the program was actually executed.