Skip to content

windows: Application startup fails due to env vars #3732

@kliushnichenko

Description

@kliushnichenko

After adding System.getenv() to the config in Jooby 4, the startup fails under Windows.

Windows may add some system env vars starting from =, which is not allowed in typesafe config.
e.g.

=ExitCode        = 00000000
=::              = ::\
=C:              = C:\Temp

com.typesafe.config.ConfigException$BadPath: path parameter: Invalid path '=C:': Token not allowed in path expression: '=' (you can double-quote this token if you really want it here)

Moreover, there are more special symbols that are allowed in env var names but not allowed in typesafe config (@ # $ etc.).
A bulletproof solution will require parsing each env var key and wrapping special symbols in double quotes to make it compatible with typesafe config.

Not sure it's worth it, maybe it is better to revert this change.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions