Uh oh!
There was an error while loading. Please reload this page.
Allow env variable substitution in CLI client properties - #242
Conversation
There was a problem hiding this comment.
Pull request overview
This pull request adds environment variable substitution support to the CLI client properties file by replacing the standard Java Properties class with Apache Commons Configuration2's Configuration interface. This allows users to specify property values like password=${env:OIE_PASSWORD} in the configuration file, which will be resolved from environment variables at runtime.
Changes:
- Replaced
Propertieswith Apache Commons Configuration2'sConfigurationfor loading CLI configuration - Added new imports for Configuration2 classes
- Modified configuration loading logic to use
FileBasedConfigurationBuilderinstead of direct file reading
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
VillePekka
commented
Feb 1, 2026
Plan is to next test different scenarios with both correct and incorrect credentials: |
2dc36ff to
4b8c71dCompare…variables in config file. Signed-off-by: Ville Ranta-aho <ville@ville-pekka.com> Signed-off-by: Tony Germano <tony@germano.name>
tonygermano
left a comment
There was a problem hiding this comment.
I did the following:
- squashed all commits
- fixed whitespace issues
- rebased onto main
- removed some unnecessary imports
- reverted copilot suggestion and initialized config to empty BaseConfiguration
I tested all of your scenarios mentioned in #242 (comment)
I also tested with no config file
- no command line arguments (shows help)
- setting -a -u and -p on the command line (logs in if everything is valid)
- setting -a and -u, but not -p (shows help)
mgaffigan
left a comment
There was a problem hiding this comment.
Did not test, but the changes look good.
Uh oh!
There was an error while loading. Please reload this page.
VillePekka
commented
Feb 11, 2026
Thank you @tonygermano ! |
Testing the functionality on Linux:
password=${env:OIE_PASSWORD}export OIE_PASSWORD=<password>~/engine/server/setup$ java -jar mirth-cli-launcher.jar -c ../../command/conf/mirth-cli-config.properties