Starting with version 12.14, I am having issues with ${var}-style environment variable expansion on Windows (same code works on fine on Linux). It worked fine for me on 12.12, so perhaps you might know of something that changed. My paths in the variables may have things like ..\ in them.
I forgot to mention, my expanded paths that aren't working contain
?unresolved?
pls provide more details: config file, log file, configuration which is not correctly interpolated.
value of the env var which is not correctly interpolated and where it is set (windows globa, user env ? command file ?)
ps: remember to remove any private info, esp. pwds, from the provided data
It seems related to the case of the windows environment variables. All of our ${var}-style variables are lower case in our config file, but it seems like starting with 12.14 I have to make them lower case when I initially
set
them in the .bat file that sets them (and calls the wrapper), whereas with 12.12 I couldset
them with an upper case name and they would get converted to lower case automatically for use in the config file. Does that make sense with what changes from 12.12 to 12.14?This is for the Ghidra project:
- ghidraSvr.bat
- server.conf
Last edit: Ryan Kurtz 2021-08-30
in windows env vars are not case sensitive. therefore yajsw converts them to lower case. it seems that this has been so since at least release 11. so i do not think that there should be any differences between versions 12.12 and 12.14.
I experienced the same issue and narrowed it down to a change between 12.13 and 12.14.
This commit https://sourceforge.net/p/yajsw/yajsw/ci/4a25095893569605c48e8f17e4749433b8a155f9/ makes changes to
YajswConfigurationImpl
and how it reads config. It used to create a CaseInsensitiveMap which tolowercase()ed the key before inserting into the map. This has been commented out and replaced with a call toEnvironmentConfiguration
, which internally callsSystem.getenv()
. The docs for this say it is case sensitive?Last edit: Alex Sheppard 2022-08-25
Alex, thanks for the feedback. You are right.
Release 13.05
Last edit: rzo 2022-10-02
Hi @rzorzorzo,
I'm not sure if this is working as expected?
Your latest commit https://sourceforge.net/p/yajsw/yajsw/ci/611c787cda585ebe2d112370d22cb05aa338cb7e/tree/src/yajsw/src/main/java/org/rzo/yajsw/util/Utils.java?diff=d4513df542383f3a7be6066f1a5b5dd53bafc502
lowercases the key on windows before you've read the value out of
conf.getProperty(key)
. My env var is in uppercase and it therefore can't find it. If I temporarily change it to lowercase it can then be found.I think the to lowercase should only be performed on the property key being put into the result e.g. :
I tested 13.05 and still had issues with uppercase environment variables in Windows (my original issue)
Seems to be working correctly in 13.08.