Skip to content

Commit e99ecb5

Browse files
shjalamilan-zededa
authored andcommitted
get eden home path from environment variable
Read from the environment variable EDEN_HOME. If the environment variable is not set, then use the default path. Signed-off-by: Shahriyar Jalayeri <[email protected]>
1 parent 756ed09 commit e99ecb5

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

pkg/utils/config.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,10 @@ func DefaultEdenDir() (string, error) {
150150
if err != nil {
151151
return "", err
152152
}
153+
edenHome := strings.TrimSpace(os.Getenv("EDEN_HOME"))
154+
if edenHome != "" {
155+
return edenHome, nil
156+
}
153157
return filepath.Join(usr.HomeDir, defaults.DefaultEdenHomeDir), nil
154158
}
155159

0 commit comments

Comments
 (0)