Skip to content

Commit 3629a07

Browse files
author
sebastian gomez
authored
Merge pull request #49 from genexuslabs/envars-branch
The environment variable to replace the config entries was not honoring the docs
2 parents 6539d40 + 7f8895a commit 3629a07

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

common/src/main/java/com/genexus/util/IniFile.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -311,14 +311,13 @@ private String getPropertyImpl(String section, String key) {
311311
private final String ENVVAR_PREFIX = "GX_";
312312

313313
private String getEnvironmentValue(String section, String key){
314-
315314
if (section != null && !section.isEmpty() && section != "Client"){
316315
for(int i = 0; i < m_invalidChars.length; i++)
317316
section = section.replace(m_invalidChars[i], "_");
318-
key = section + "_" + ENVVAR_PREFIX + key;
317+
key = String.format("%s%s_%s", ENVVAR_PREFIX, section.toUpperCase(), key.toUpperCase());
319318
}
320319
else
321-
key = ENVVAR_PREFIX + key;
320+
key = String.format("%s%s", ENVVAR_PREFIX, key.toUpperCase());
322321

323322
return System.getenv(key);
324323
}

0 commit comments

Comments
 (0)