Get eden home path from environment variable#1055
Merged
milan-zededa merged 1 commit intolf-edge:masterfrom Mar 13, 2025
Merged
Get eden home path from environment variable#1055milan-zededa merged 1 commit intolf-edge:masterfrom
milan-zededa merged 1 commit intolf-edge:masterfrom
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR adds functionality to prioritize the EDEN_HOME environment variable when determining the Eden home path, falling back to a default path if not set.
- Reads the EDEN_HOME environment variable.
- Returns the EDEN_HOME value if set, otherwise returns a default constructed from the user's home directory.
Comments suppressed due to low confidence (1)
pkg/utils/config.go:153
- [nitpick] Consider trimming whitespace from 'edenHome' (e.g., using strings.TrimSpace) to avoid potential issues when the environment variable contains accidental leading or trailing spaces.
edenHome := os.Getenv("EDEN_HOME")
There was a problem hiding this comment.
Pull Request Overview
This PR adds support for setting the Eden home directory via the EDEN_HOME environment variable, falling back to a default path if the variable is not set.
- Added environment variable reading in pkg/utils/config.go
- Returns the EDEN_HOME value directly if set, otherwise constructs the default home directory
Read from the environment variable EDEN_HOME. If the environment variable is not set, then use the default path. Signed-off-by: Shahriyar Jalayeri <shahriyar@zededa.com>
There was a problem hiding this comment.
Pull Request Overview
This PR adds support for specifying the Eden home directory via the EDEN_HOME environment variable. If EDEN_HOME is set (after trimming whitespace), that value is used; otherwise, the default path based on the user's home directory is returned.
- Read EDEN_HOME from the environment.
- Use a default path when EDEN_HOME is not provided.
milan-zededa
approved these changes
Mar 13, 2025
Contributor
|
Merging, failures are not related to this change. |
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.
Read from the environment variable EDEN_HOME. If the environment variable is not set, then use the default path.