feat: allow environment variables to be reset by setting them to the empty string#3497
Merged
jarhodes314 merged 1 commit intothin-edge:mainfrom Mar 21, 2025
Merged
Conversation
Codecov ReportAttention: Patch coverage is
📢 Thoughts on this report? Let us know! 🚀 New features to boost your workflow:
|
Contributor
Robot Results
|
Signed-off-by: James Rhodes <jarhodes314@gmail.com>
8a25f19 to
43f7336
Compare
reubenmiller
approved these changes
Mar 21, 2025
Contributor
reubenmiller
left a comment
There was a problem hiding this comment.
Works nicely, and solves the linked ticket.
Simple example showing that the user can ignore the environment variable by setting it to an empty value.
export TEDGE_MQTT_CLIENT_HOST=tedge
TEDGE_MQTT_CLIENT_HOST= tedge mqtt sub '#' --log-level info >/dev/null
2025-03-21T14:19:41.831241Z INFO MQTT: Connecting to broker: host=127.0.0.1:2883, session_name=Some("tedge-sub-50652")
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Proposed changes
Allow a configuration to be reset to the default by passing an environment variable value of
''(an empty string). Previously, to "undo" the effects of setting aTEDGE_variable for configuration (so you can use the default value), you would need to unset the valueTypes of changes
Paste Link to the issue
Checklist
just prepare-devonce)just formatas mentioned in CODING_GUIDELINESjust checkas mentioned in CODING_GUIDELINESFurther comments