-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Use environment variables to configure the ports used by chip-tool #3675
Use environment variables to configure the ports used by chip-tool #3675
Conversation
a1e93d7
to
2ec0e8c
Compare
Can we use command line options instead? |
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.
Would prefer not to use environment variables for this as it's a support burden (it sweeps the option under the rug, where it can affect unintended processes - say you run more than one chip-tool as part of a test).
+1 |
This case is fine if you use the env variable on the same line as the command. The scope of the variable will not affect the shell. For example That said, I understand your point and a command line options would be way much better. The real issue is that chip-tool has grown without true command line parsing facility and is a bit dumb at the moment when it comes to command arguments... @mspang Would you be fine with a followup to fix the real issue. It may take some time to reformat chip-tool to support it and I would like to move forward in the meantime. |
+1 |
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.
approving with the assumption that this will get a real fix soon
Ok (Sorry - please use the re-request review button). |
Thanks. I will rebase this one once I'm done converting |
@vivien-apple - any chance you could rebase? trying to cleanup old PRs and either get them merged or closed. Thanks! |
@vivien-apple once the merge conflict is addressed it should be good to merge :D |
Sadly I need to rebase |
@vivien-apple conflicts? |
2ec0e8c
to
519ef53
Compare
I finally rebased this PR on top of It will likely not build until #4071 lands though since I use the That said, I remove the needs for |
519ef53
to
ab29b4b
Compare
Problem
chip-tool ask the user to configure the port to send messages. This default probably does not need to change much.
Also in some situations it is useful to configure the port used by chip-tool to listen messages. For example if you run both the chip-tool client application and an instance of the chip-app-server on the same machine.
If you do not configure them, both try to listen on the same port, and so chip-tool sends messages to itself...
Summary of Changes
CHIP_TOOL_REMOTE_PORT
environment variableCHIP_TOOL_LOCAL_PORT
environment variableCHIP_LOG_PROGRESS
toCHIP_TOOL_LOG_PROGRESS