Menu

#183 Environment variable issues on Windows

All
closed-fixed
nobody
None
5
2023-02-21
2021-08-27
Ryan Kurtz
No

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.

Discussion

  • Ryan Kurtz

    Ryan Kurtz - 2021-08-27

    I forgot to mention, my expanded paths that aren't working contain ?unresolved?

     
  • john

    john - 2021-08-28

    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 ?)

     
  • john

    john - 2021-08-28

    ps: remember to remove any private info, esp. pwds, from the provided data

     
  • Ryan Kurtz

    Ryan Kurtz - 2021-08-30

    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 could set 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
  • john

    john - 2021-09-18

    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.

     
  • rzo

    rzo - 2021-10-16
    • status: open --> closed-wont-fix
     
  • Alex Sheppard

    Alex Sheppard - 2022-08-25

    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 to EnvironmentConfiguration, which internally calls System.getenv(). The docs for this say it is case sensitive?

     

    Last edit: Alex Sheppard 2022-08-25
  • rzo

    rzo - 2022-10-02

    Alex, thanks for the feedback. You are right.
    Release 13.05

     

    Last edit: rzo 2022-10-02
  • rzo

    rzo - 2022-10-22
    • status: closed-wont-fix --> closed-fixed
     
  • Ryan Kurtz

    Ryan Kurtz - 2022-10-26

    I tested 13.05 and still had issues with uppercase environment variables in Windows (my original issue)

     
  • Ryan Kurtz

    Ryan Kurtz - 2023-02-21

    Seems to be working correctly in 13.08.

     

Log in to post a comment.