+ searchIn = append(searchIn, os.Getenv("XDS_CONFIG"))
+ if usrHome := common.GetUserHome(); usrHome != "" {
+ searchIn = append(searchIn, path.Join(usrHome, ".xds", "cli", defaultConfigEnvFilename))
+ }
+ searchIn = append(searchIn, path.Join("/etc", "xds", "cli", defaultConfigEnvFilename))
+
+ // Use the first existing env config file
+ confFile := ""
+ for _, p := range searchIn {
+ if pr, err := common.ResolveEnvVar(p); err == nil {
+ earlyPrintf("Check if confFile exists : %v", pr)
+ if common.Exists(pr) {
+ confFile = pr
+ break
+ }
+ }
+ }