Skip to content

Commit eda5f34

Browse files
committed
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 <shahriyar@zededa.com>
1 parent 9b0d3c9 commit eda5f34

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 := 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)